import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.graphics.drawing.d.ts',
  content: "/*\n * Copyright (c) 2023-2024 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit ArkGraphics2D\n */\nimport type image from './@ohos.multimedia.image';\nimport type common2D from './@ohos.graphics.common2D';\nimport { Resource } from './global/resource';\n/**\n * The common2D module defines some common data types in the 2D graphics field.\n *\n * @namespace drawing\n * @syscap SystemCapability.Graphics.Drawing\n * @since 11\n */\ndeclare namespace drawing {\n    /**\n     * Enumerates the blend modes. In blend mode, each operation generates a new color from two colors (source color and destination color).\n     * These operations are the same for the red, green, and blue color channels (the alpha channel follows a different rule).\n     * For simplicity, the following description uses the alpha channel as an example rather than naming each channel individually.\n     *\n     * For brevity, the following abbreviations are used:\n     *\n     * s: source.\n     * d: destination.\n     * sa: source alpha.\n     * da: destination alpha.\n     * The following abbreviations are used in the calculation result:\n     *\n     * r: used when the calculation method is the same for the four channels (alpha, red, green, and blue channels).\n     * ra: used when only the alpha channel is manipulated.\n     * rc: used when the other three color channels are manipulated.\n     * The table below shows the effect of each blend mode, where the yellow rectangle is the source and the blue circle is the destination.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    enum BlendMode {\n        /**\n         * r = 0, sets the the destination pixels to fully transparent.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        CLEAR = 0,\n        /**\n         * r = s (all channels of the result equal those of the source), replaces the destination pixels with the source pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SRC = 1,\n        /**\n         * r = d (all channels of the result equal those of the destination), keeps the destination pixels unchanged.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DST = 2,\n        /**\n         * r = s + (1 - sa) * d, draws the source pixels over the destination pixels, considering the source's transparency.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SRC_OVER = 3,\n        /**\n         * r = d + (1 - da) * s, draws the destination pixels over the source pixels, considering the destination's transparency.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DST_OVER = 4,\n        /**\n         * r = s * da, retains only the intersection of the source pixels with the opaque parts of the destination.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SRC_IN = 5,\n        /**\n         * r = d * sa, retains only the intersection of the destination pixels with the opaque parts of the source.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DST_IN = 6,\n        /**\n         * r = s * (1 - da), retains the parts of the source pixels that do not overlap with the destination.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SRC_OUT = 7,\n        /**\n         * r = d * (1 - sa), retains the parts of the destination pixels that do not overlap with the source.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DST_OUT = 8,\n        /**\n         * r = s * da + d * (1 - sa), covers the destination pixels with the source pixels, showing the source only in the opaque parts of the destination.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SRC_ATOP = 9,\n        /**\n         * r = d * sa + s * (1 - da), covers the source pixels with the destination pixels, showing the destination only in the opaque parts of the source.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DST_ATOP = 10,\n        /**\n         * r = s * (1 - da) + d * (1 - sa), shows only the non-overlapping parts of the source and destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        XOR = 11,\n        /**\n         * r = min(s + d, 1), adds the color values of the source and destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        PLUS = 12,\n        /**\n         * r = s * d, multiplies the color values of the source and destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        MODULATE = 13,\n        /**\n         * r = s + d - s * d, inverts the color values of the source and destination pixels, multiplies them,\n         * and then inverts the result, typically producing a brighter outcome.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SCREEN = 14,\n        /**\n         * Selectively applies MULTIPLY or SCREEN based on the brightness of the destination pixels, enhancing contrast.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        OVERLAY = 15,\n        /**\n         * rc = s + d - max(s * da, d * sa), ra = s + (1 - sa) * d, takes the darker color values between the source and destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DARKEN = 16,\n        /**\n         * rc = s + d - min(s * da, d * sa), ra = s + (1 - sa) * d, takes the lighter color values between the source and destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        LIGHTEN = 17,\n        /**\n         * Brightens the destination pixels by reducing contrast to reflect the source pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        COLOR_DODGE = 18,\n        /**\n         * Darkens the destination pixels by increasing contrast to reflect the source pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        COLOR_BURN = 19,\n        /**\n         * Selectively applies MULTIPLY or SCREEN based on the brightness of the source pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        HARD_LIGHT = 20,\n        /**\n         * Softly brightens or darkens the destination pixels based on the brightness of the source pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SOFT_LIGHT = 21,\n        /**\n         * rc = s + d - 2 * (min(s * da, d * sa)), ra = s + (1 - sa) * d, calculates the difference between the color values of the source and destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        DIFFERENCE = 22,\n        /**\n         * rc = s + d - two(s * d), ra = s + (1 - sa) * d, similar to DIFFERENCE but with lower contrast.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        EXCLUSION = 23,\n        /**\n         * r = s * (1 - da) + d * (1 - sa) + s * d, multiplies the color values of the source and destination pixels, typically resulting in a darker outcome.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        MULTIPLY = 24,\n        /**\n         * Uses the hue of the source pixels and the saturation and brightness of the destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        HUE = 25,\n        /**\n         * Uses the saturation of the source pixels and the hue and brightness of the destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        SATURATION = 26,\n        /**\n         * Uses the hue and saturation of the source pixels and the brightness of the destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        COLOR = 27,\n        /**\n         * Uses the brightness of the source pixels and the hue and saturation of the destination pixels.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        LUMINOSITY = 28\n    }\n    /**\n     * Enumerates the directions of a closed contour.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum PathDirection {\n        /**\n         * Adds a closed contour clockwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        CLOCKWISE = 0,\n        /**\n         * Adds a closed contour counterclockwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        COUNTER_CLOCKWISE = 1\n    }\n    /**\n     * Enumerates the fill types of a path.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum PathFillType {\n        /**\n         * Specifies that \"inside\" is computed by a non-zero sum of signed edge crossings. Specifically, draws a point and emits a ray in any direction.\n         * A count is used to record the number of intersection points of the ray and path, and the initial count is 0.\n         * When encountering a clockwise intersection point (the path passes from the left to the right of the ray), the count increases by 1.\n         * When encountering a counterclockwise intersection point (the path passes from the right to the left of the ray), the count decreases by 1.\n         * If the final count is not 0, the point is inside the path and needs to be colored. If the final count is 0, the point is not colored.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        WINDING = 0,\n        /**\n         * Specifies that \"inside\" is computed by an odd number of edge crossings. Specifically, draws a point and emits a ray in any direction.\n         * If the number of intersection points of the ray and path is an odd number, the point is considered to be inside the path and needs to be colored.\n         * If the number is an even number, the point is not colored.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        EVEN_ODD = 1,\n        /**\n         * Same as WINDING, but draws outside of the path, rather than inside.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INVERSE_WINDING = 2,\n        /**\n         * Same as EVEN_ODD, but draws outside of the path, rather than inside.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INVERSE_EVEN_ODD = 3\n    }\n    /**\n    * Enumerates the dimensions of matrix information in path measurement.\n    * It is often used in animation scenarios where objects move along a path.\n    * @enum { number }\n    * @syscap SystemCapability.Graphics.Drawing\n    * @since 12\n    */\n    enum PathMeasureMatrixFlags {\n        /**\n         * Matrix corresponding to the position information.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        GET_POSITION_MATRIX = 0,\n        /**\n         * Matrix corresponding to the tangent information.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        GET_TANGENT_MATRIX = 1,\n        /**\n         * Matrix corresponding to the position and tangent information.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        GET_POSITION_AND_TANGENT_MATRIX = 2\n    }\n    /**\n     * Implements a rounded rectangle.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class RoundRect {\n        /**\n         * Creates a deep copy of the specified round rect object.\n         * @param { RoundRect } roundRect - The round rect object to copy.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        constructor(roundRect: RoundRect);\n        /**\n         * A constructor used to create a RoundRect object. A rounded rectangle is created when both xRadii and yRadii are greater than 0.\n         * Otherwise, only a rectangle is created.\n         * @param { common2D.Rect } rect - Rectangle that encloses the rounded rectangle to create.\n         * @param { number } xRadii - Radius of the rounded corner on the X axis. The value is a floating point number. A negative number is invalid.\n         * @param { number } yRadii - Radius of the rounded corner on the Y axis. The value is a floating point number. A negative number is invalid.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor(rect: common2D.Rect, xRadii: number, yRadii: number);\n        /**\n         * Sets the radii of the specified rounded corner in this rounded rectangle.\n         * @param { CornerPos } pos - Position of the rounded corner.\n         * @param { number } x - Radius of the rounded corner on the X axis. The value is a floating point number. A negative number is invalid.\n         * @param { number } y - Radius of the rounded corner on the Y axis. The value is a floating point number. A negative number is invalid.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setCorner(pos: CornerPos, x: number, y: number): void;\n        /**\n         * Obtains the radii of the specified rounded corner in this rounded rectangle.\n         * @param { CornerPos } pos - Position of the rounded corner.\n         * @returns { common2D.Point } Point. The horizontal coordinate indicates the radius of the rounded corner on the X axis,\n         * and the vertical coordinate indicates the radius on the Y axis.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getCorner(pos: CornerPos): common2D.Point;\n        /**\n         * Translates this rounded rectangle by an offset along the X axis and Y axis.\n         * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis,\n         * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number.\n         * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis,\n         * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        offset(dx: number, dy: number): void;\n    }\n    /**\n     * Enumerates the path operation types. It is often used in path combination and clipping scenarios.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum PathOp {\n        /**\n         * Difference operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DIFFERENCE = 0,\n        /**\n         * Intersection operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INTERSECT = 1,\n        /**\n         * Union operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        UNION = 2,\n        /**\n         * Xor operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        XOR = 3,\n        /**\n         * Reverse difference operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        REVERSE_DIFFERENCE = 4\n    }\n    /**\n     * Enumerates the path operation types contained in an iterator. It is used to read path operation instructions.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    enum PathIteratorVerb {\n        /**\n         * Sets the start point.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        MOVE = 0,\n        /**\n         * Adds a line segment.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        LINE = 1,\n        /**\n         * Adds a quadratic Bezier curve for smooth transitions.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        QUAD = 2,\n        /**\n         * Adds a conic curve.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        CONIC = 3,\n        /**\n         * Adds a cubic Bezier curve for smooth transitions.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        CUBIC = 4,\n        /**\n         * Closes a path.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        CLOSE = 5,\n        /**\n         * The path setting is complete.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        DONE = CLOSE + 1\n    }\n    /**\n     * Implements a path operation iterator. You can read path operation instructions by traversing the iterator.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    class PathIterator {\n        /**\n         * Creates an iterator and binds it with a path.\n         * @param { Path } path - Path object bound to the iterator.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        constructor(path: Path);\n        /**\n         * Retrieves the next operation in this path and moves the iterator to that operation.\n         * @param { Array<common2D.Point> } points - Indicates the point array.\n         * @param { number } offset - Indicates the offset into the array where entries should be placed. The default value is 0.\n         * @returns { PathIteratorVerb } Returns the next verb in this iterator's path.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        next(points: Array<common2D.Point>, offset?: number): PathIteratorVerb;\n        /**\n         * Retrieves the next operation in this path, without moving the iterator.\n         * @returns { PathIteratorVerb } Returns the next verb in the iteration.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        peek(): PathIteratorVerb;\n        /**\n         * Checks whether there is a next operation in the path operation iterator.\n         * @returns { boolean } Returns true if there are more elements to be iterated through, false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        hasNext(): boolean;\n    }\n    /**\n     * A compound geometric path consisting of line segments, arcs, quadratic Bezier curves, and cubic Bezier curves.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class Path {\n        /**\n         * Constructs a path.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor();\n        /**\n         * Constructs a copy of an existing path.\n         * @param { Path } path - Path to copy.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor(path: Path);\n        /**\n         * Sets the Path with the same content of another.\n         * @param { Path } src - the path to copy content from.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        set(src: Path): void;\n        /**\n         * Sets the start point of this path.\n         * @param { number } x - X coordinate of the start point. The value is a floating point number.\n         * @param { number } y - Y coordinate of the start point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        moveTo(x: number, y: number): void;\n        /**\n         * Draws a line segment from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used.\n         * @param { number } x - X coordinate of the target point. The value is a floating point number.\n         * @param { number } y - Y coordinate of the target point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        lineTo(x: number, y: number): void;\n        /**\n         * Draws an arc to this path using angle arc mode. This mode first defines a rectangle and takes its inscribed ellipse.\n         * Then, it specifies a start angle and a sweep angle. The arc is the portion of the ellipse's circumference defined by the start angle\n         * and the sweep angle. By default, a line segment from the last point of the path to the start point of the arc is also added.\n         * @param { number } x1 - X coordinate of the upper left corner of the rectangle. The value is a floating point number.\n         * @param { number } y1 - Y coordinate of the upper left corner of the rectangle. The value is a floating point number.\n         * @param { number } x2 - X coordinate of the lower right corner of the rectangle. The value is a floating point number.\n         * @param { number } y2 - Y coordinate of the lower right corner of the rectangle. The value is a floating point number.\n         * @param { number } startDeg - Start angle. The start direction (0°) of the angle is the positive direction of the X axis.\n         * @param { number } sweepDeg - Angle to sweep, in degrees. A positive number indicates a clockwise sweep,\n         * and a negative value indicates a counterclockwise swipe. The actual swipe degree is the modulo operation result of the input parameter by 360.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        arcTo(x1: number, y1: number, x2: number, y2: number, startDeg: number, sweepDeg: number): void;\n        /**\n         * Draws a quadratic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used.\n         * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number.\n         * @param { number } ctrlY - Y coordinate of the control point. The value is a floating point number.\n         * @param { number } endX - X coordinate of the target point. The value is a floating point number.\n         * @param { number } endY - Y coordinate of the target point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        quadTo(ctrlX: number, ctrlY: number, endX: number, endY: number): void;\n        /**\n         * Draws a conic curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used.\n         * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number.\n         * @param { number } ctrlY - Y coordinate of the control point. The value is a floating point number.\n         * @param { number } endX - X coordinate of the target point. The value is a floating point number.\n         * @param { number } endY - Y coordinate of the target point. The value is a floating point number.\n         * @param { number } weight - Weight of the curve, which determines its shape. The larger the value,\n         * the closer of the curve to the control point. If the value is less than or equal to 0,\n         * this API is equivalent to lineTo, that is, adding a line segment from the last point of the path to the target point.\n         * If the value is 1, this API is equivalent to quadTo. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        conicTo(ctrlX: number, ctrlY: number, endX: number, endY: number, weight: number): void;\n        /**\n         * Draws a cubic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used.\n         * @param { number } ctrlX1 - X coordinate of the first control point. The value is a floating point number.\n         * @param { number } ctrlY1 - Y coordinate of the first control point. The value is a floating point number.\n         * @param { number } ctrlX2 - X coordinate of the second control point. The value is a floating point number.\n         * @param { number } ctrlY2 - Y coordinate of the second control point. The value is a floating point number.\n         * @param { number } endX - X coordinate of the target point. The value is a floating point number.\n         * @param { number } endY - Y coordinate of the target point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        cubicTo(ctrlX1: number, ctrlY1: number, ctrlX2: number, ctrlY2: number, endX: number, endY: number): void;\n        /**\n         * Sets the start position relative to the last point of this path. If the path is empty, the start point (0, 0) is used.\n         * @param { number } dx - X offset of the start point relative to the last point. A positive number indicates a rightward shift from the last point,\n         * and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } dy - Y offset of the start point relative to the last point. A positive number indicates an upward shift from the last point,\n         * and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rMoveTo(dx: number, dy: number): void;\n        /**\n         * Draws a line segment from the last point of this path to a point relative to the last point. If the path is empty, the start point (0, 0) is used.\n         * @param { number } dx - X offset of the target point relative to the last point. A positive number indicates a rightward shift from the last point,\n         * and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } dy - Y offset of the target point relative to the last point. A positive number indicates an upward shift from the last point,\n         * and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rLineTo(dx: number, dy: number): void;\n        /**\n         * Draws a quadratic Bezier curve from the last point of this path to a point relative to the last point.\n         * If the path is empty, the start point (0, 0) is used.\n         * @param { number } dx1 - X offset of the control point relative to the last point. A positive number indicates a rightward shift from the last point,\n         * and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } dy1 - Y offset of the control point relative to the last point. A positive number indicates an upward shift from the last point,\n         * and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @param { number } dx2 - X offset of the target point relative to the last point. A positive number indicates a rightward shift from the last point,\n         * and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } dy2 - Y offset of the target point relative to the last point. A positive number indicates an upward shift from the last point,\n         * and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rQuadTo(dx1: number, dy1: number, dx2: number, dy2: number): void;\n        /**\n         * Draws a conic curve from the last point of this path to a point relative to the last point. If the path is empty, the start point (0, 0) is used.\n         * @param { number } ctrlX - X offset of the control point relative to the last point. A positive number indicates a rightward shift from the last point,\n         * and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } ctrlY - Y offset of the control point relative to the last point. A positive number indicates an upward shift from the last point,\n         * and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @param { number } endX - X offset of the target point relative to the last point. A positive number indicates a rightward shift from the last point,\n         * and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } endY - Y offset of the target point relative to the last point. A positive number indicates an upward shift from the last point,\n         * and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @param { number } weight - Weight of the curve, which determines its shape. The larger the value, the closer of the curve to the control point.\n         * If the value is less than or equal to 0, this API is equivalent to rLineTo, that is, adding a line segment from the last point of the path\n         * to the target point. If the value is 1, this API is equivalent to rQuadTo. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rConicTo(ctrlX: number, ctrlY: number, endX: number, endY: number, weight: number): void;\n        /**\n         * Draws a cubic Bezier curve from the last point of this path to a point relative to the last point.\n         * If the path is empty, the start point (0, 0) is used.\n         * @param { number } ctrlX1 - X offset of the first control point relative to the last point. A positive number indicates a rightward shift\n         * from the last point, and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } ctrlY1 - Y offset of the first control point relative to the last point. A positive number indicates an upward shift\n         * from the last point, and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @param { number } ctrlX2 - X offset of the second control point relative to the last point. A positive number indicates a rightward shift\n         * from the last point, and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } ctrlY2 - Y offset of the second control point relative to the last point. A positive number indicates an upward shift\n         * from the last point, and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @param { number } endX - X offset of the target point relative to the last point. A positive number indicates a rightward shift\n         * from the last point, and a negative number indicates a leftward shift from the last point. The value is a floating point number.\n         * @param { number } endY - Y offset of the target point relative to the last point. A positive number indicates an upward shift\n         * from the last point, and a negative number indicates a downward shift from the last point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rCubicTo(ctrlX1: number, ctrlY1: number, ctrlX2: number, ctrlY2: number, endX: number, endY: number): void;\n        /**\n         * Adds a polygon to this path.\n         * @param { Array<common2D.Point> } points - Array that holds the vertex coordinates of the polygon.\n         * @param { boolean } close - Whether to close the path, that is, whether to add a line segment from the start point\n         * to the end point of the path. The value true means to close the path, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addPolygon(points: Array<common2D.Point>, close: boolean): void;\n        /**\n         * Combines this path with the passed-in path based on the specified operation mode.\n         * @param { Path } path - Path object, which will be combined with the current path.\n         * @param { PathOp } pathOp - Operation mode.\n         * @returns { boolean } boolean - Result of the path combination result. The value true means that the path combination is successful,\n         * and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        op(path: Path, pathOp: PathOp): boolean;\n        /**\n         * Adds an arc to this path.\n         *\n         * When startAngle and sweepAngle meet the following conditions, an oval instead of an arc is added:\n         *\n         * The result of startAngle modulo 90 is close to 0.\n         * The value of sweepAngle is not in the range of (-360, 360).\n         *\n         * In other cases, this API adds an arc by applying the result of sweepAngle modulo 360 to the path.\n         * @param { common2D.Rect } rect - Rectangular boundary that encapsulates the oval including the arc.\n         * @param { number } startAngle - Start angle of the arc, in degrees. The value 0 indicates the positive direction of the X axis.\n         * The value is a floating point number.\n         * @param { number } sweepAngle - Angle to sweep, in degrees. A positive number indicates a clockwise sweep,\n         * and a negative number indicates a counterclockwise sweep. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addArc(rect: common2D.Rect, startAngle: number, sweepAngle: number): void;\n        /**\n         * Adds a circle to this path in the specified direction. The start point of the circle is (x + radius, y).\n         * @param { number } x - X coordinate of the center of the circle. The value is a floating point number.\n         * @param { number } y - Y coordinate of the center of the circle. The value is a floating point number.\n         * @param { number } radius - Radius of the circle. The value is a floating point number.\n         * If the value is less than or equal to 0, there is no effect.\n         * @param { PathDirection } pathDirection - Direction of the path. The default direction is clockwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addCircle(x: number, y: number, radius: number, pathDirection?: PathDirection): void;\n        /**\n         * Adds the inscribed ellipse of a rectangle to this path in the specified direction.\n         * @param { common2D.Rect } rect - Rectangular boundary of the oval.\n         * @param { number } start - Start point of the oval, where 0, 1, 2, and 3 correspond to the upper, right, lower, and left points, respectively.\n         * The value is an integer greater than or equal to 0. If the value is greater than or equal to 4, the remainder of 4 is used.\n         * @param { PathDirection } pathDirection - Direction of the path. The default direction is clockwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addOval(rect: common2D.Rect, start: number, pathDirection?: PathDirection): void;\n        /**\n         * Adds a rectangle to this path in the specified direction. The start point is the upper left corner of the rectangle.\n         * @param { common2D.Rect } rect - Rectangle.\n         * @param { PathDirection } pathDirection - Direction of the path. The default direction is clockwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addRect(rect: common2D.Rect, pathDirection?: PathDirection): void;\n        /**\n         * Adds a rounded rectangle to this path in the specified direction. When the path direction is clockwise,\n         * the start point is at the intersection of the rounded rectangle's left boundary and its lower left corner.\n         * When the path direction is counterclockwise, the start point is at the intersection point\n         * between the left boundary and the upper left corner.\n         * @param { RoundRect } roundRect - Rounded rectangle.\n         * @param { PathDirection } pathDirection - The default value is CLOCKWISE.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addRoundRect(roundRect: RoundRect, pathDirection?: PathDirection): void;\n        /**\n         * Transforms the points in a path by a matrix and stores the resulting path in the current Path object.\n         * @param { Path } path - Source Path object.\n         * @param { Matrix | null } matrix - Matrix object. The default value is an identity matrix.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addPath(path: Path, matrix?: Matrix | null): void;\n        /**\n         * Transforms the points in this path by a matrix.\n         * @param { Matrix } matrix - Matrix object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        transform(matrix: Matrix): void;\n        /**\n         * Checks whether a coordinate point is included in this path. For details, see PathFillType.\n         * @param { number } x - X coordinate. The value is a floating point number.\n         * @param { number } y - Y coordinate. The value is a floating point number.\n         * @returns { boolean } Check result. The value true means that the coordinate point is included in the path, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        contains(x: number, y: number): boolean;\n        /**\n         * Changes the last point of the path to specific value.\n         * @param { number } x - Indicates the new x-axis value for the last point.\n         * @param { number } y - Indicates the new y-axis value for the last point.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setLastPoint(x: number, y: number): void;\n        /**\n         * Sets the fill type of this path. The fill type determines how \"inside\" of the path is drawn.\n         * For example, when the fill type Winding is used, \"inside\" of the path is determined by a non-zero sum of signed edge crossings.\n         * When EvenOdd is used, \"inside\" of the path is determined by an odd number of edge crossings.\n         * @param { PathFillType } pathFillType - Fill type of the path.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setFillType(pathFillType: PathFillType): void;\n        /**\n         * Gets fill type, the rule used to fill path.\n         * @returns { PathFillType } Returns the pathFillType.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        getFillType(): PathFillType;\n        /**\n         * Obtains the minimum bounding rectangle that encloses this path.\n         * @returns { common2D.Rect } Rect object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getBounds(): common2D.Rect;\n        /**\n         * Closes this path by adding a line segment from the start point to the last point of the path.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        close(): void;\n        /**\n         * Offsets this path by specified distances along the X axis and Y axis and stores the resulting path in the Path object returned.\n         * @param { number } dx - X offset. A positive number indicates an offset towards the positive direction of the X axis,\n         * and a negative number indicates an offset towards the negative direction of the X axis. The value is a floating point number.\n         * @param { number } dy - Y offset. A positive number indicates an offset towards the positive direction of the Y axis,\n         * and a negative number indicates an offset towards the negative direction of the Y axis. The value is a floating point number.\n         * @returns { Path } New path generated.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        offset(dx: number, dy: number): Path;\n        /**\n         * Resets the path data.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        reset(): void;\n        /**\n         * Clears any lines and curves from the path but keeps the internal storage for faster reuse.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        rewind(): void;\n        /**\n         * Check if the path is empty (has no line or curve).\n         *\n         * @returns { boolean } Returns true if the path is empty; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        isEmpty(): boolean;\n        /**\n         * Check if the path represents a rectangle.\n         *\n         * @param { common2D.Rect | null } rect - Indicates the Rect object.\n         * @returns { boolean } Returns true if the path represents a rectangle; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        isRect(rect: common2D.Rect | null): boolean;\n        /**\n         * Obtains the path length.\n         * @param { boolean } forceClosed - Whether the path is measured as a closed path.\n         * The value true means that the path is considered closed during measurement,\n         * and false means that the path is measured based on the actual closed status.\n         * @returns { number } Return path length.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLength(forceClosed: boolean): number;\n        /**\n         * Obtains the coordinates and tangent at a distance from the start point of this path.\n         *\n         * @param { boolean } forceClosed - Whether the path is measured as a closed path.\n         * The value true means that the path is considered closed during measurement,\n         * and false means that the path is measured based on the actual closed status.\n         * @param { number } distance - Distance from the start point. If a negative number is passed in, the value 0 is used.\n         * If a value greater than the path length is passed in, the path length is used. The value is a floating point number.\n         * @param { common2D.Point } position - Coordinates obtained.\n         * @param { common2D.Point } tangent - Tangent obtained, where tangent.x and tangent.y represent the cosine\n         * and sine of the tangent of the point, respectively.\n         * @returns { boolean } - Check result. The value true means that they are obtained, and false means the opposite.\n         * The values of position and tangent are not changed.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getPositionAndTangent(forceClosed: boolean, distance: number, position: common2D.Point, tangent: common2D.Point): boolean;\n        /**\n         * Extracts a segment of this path and appends it to a destination path.\n         *\n         * @param { boolean } forceClosed - Whether the path is measured as a closed path. The value true means that the path is considered closed\n         * during measurement, and false means that the path is measured based on the actual closed status.\n         * @param { number } start - Distance from the start point of the path to the start point of the segment. If it is less than 0, it defaults to 0.\n         * If it is greater than or equal to stop, the extraction fails. The value is a floating point number.\n         * @param { number } stop - Distance from the start point of the path to the end point of the segment. If it is less than or equal to start,\n         * the extraction fails. If it is greater than the path length, it defaults to the path length. The value is a floating point number.\n         * @param { boolean } startWithMoveTo - Whether to execute moveto in the destination path to move to its start point.\n         * The value true means to move to the start point, and false means the opposite.\n         * @param { Path } dst - Destination path. If the extraction succeeds, the segment is appended to the path. If the extraction fails, nothing changes.\n         * @returns { boolean } - Extraction result. The value **true** means that the extraction is successful, and **false** means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getSegment(forceClosed: boolean, start: number, stop: number, startWithMoveTo: boolean, dst: Path): boolean;\n        /**\n         * Checks whether a path is closed.\n         *\n         * @returns { boolean } - Check result. The value true means that the path is closed, and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isClosed(): boolean;\n        /**\n         * Obtains a transformation matrix at a specific position along the path, which represents the coordinates and orientation of that point.\n         *\n         * @param { boolean } forceClosed - Whether the path is measured as a closed path. The value true means that the path is considered closed\n         * during measurement, and false means that the path is measured based on the actual closed status.\n         * @param { number } distance - Distance from the start point. If a negative number is passed in, the value 0 is used.\n         * If a value greater than the path length is passed in, the path length is used. The value is a floating point number.\n         * @param { Matrix } matrix - Matrix object used to store the matrix obtained.\n         * @param { PathMeasureMatrixFlags } flags - Type of the matrix information obtained.\n         * @returns { boolean } - Check result. The value true means that a transformation matrix is obtained, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n        */\n        getMatrix(forceClosed: boolean, distance: number, matrix: Matrix, flags: PathMeasureMatrixFlags): boolean;\n        /**\n         * Parses the path represented by an SVG string.\n         *\n         * @param { string } str - String in SVG format, which is used to describe the path.\n         * @returns { boolean } Check result. The value true means that the parsing is successful, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        buildFromSvgString(str: string): boolean;\n        /**\n         * Obtains the operation iterator of this path.\n         *\n         * @returns { PathIterator } Indicates the pointer to an pathIterator object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getPathIterator(): PathIterator;\n    }\n    /**\n     * Enumerates the modes for drawing multiple points in an array.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum PointMode {\n        /**\n         * Draws each point separately.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        POINTS = 0,\n        /**\n         * Draws every two points as a line segment.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        LINES = 1,\n        /**\n         * Draws an array of points as an open polygon.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        POLYGON = 2\n    }\n    /**\n     * Enumerates the filter modes.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FilterMode {\n        /**\n         * Nearest filter mode.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FILTER_MODE_NEAREST = 0,\n        /**\n         * Linear filter mode.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FILTER_MODE_LINEAR = 1\n    }\n    /**\n     * Enumerates the shadow drawing behaviors.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum ShadowFlag {\n        /**\n         * None of the flags are enabled.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NONE = 0,\n        /**\n         * The occluder is transparent.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TRANSPARENT_OCCLUDER = 1,\n        /**\n         * Only the geometric shadow effect is used.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        GEOMETRIC_ONLY = 2,\n        /**\n         * All the flags are enabled.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ALL = 3\n    }\n    /**\n     * Implements sampling options.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class SamplingOptions {\n        /**\n         * Creates a SamplingOptions object. The default value of FilterMode is FILTER_MODE_NEAREST.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor();\n        /**\n         * Creates a SamplingOptions object.\n         * @param { FilterMode } filterMode - Storage filter mode.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor(filterMode: FilterMode);\n    }\n    /**\n     * A carrier that carries the drawn content and drawing status.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class Canvas {\n        /**\n         * Creates a Canvas object that uses a PixelMap as the drawing target.\n         * @param { image.PixelMap } pixelmap - PixelMap used to create the object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        constructor(pixelmap: image.PixelMap);\n        /**\n         * Draws a rectangle. By default, black is used for filling.\n         * @param { common2D.Rect } rect - Rectangle to draw.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawRect(rect: common2D.Rect): void;\n        /**\n         * Draws a rectangle. By default, black is used for filling. This API provides better performance than drawRect and is recommended.\n         * @param { number } left - X coordinate of the upper left corner of the rectangle. The value is a floating point number.\n         * @param { number } top - Y coordinate of the upper left corner of the rectangle. The value is a floating point number.\n         * @param { number } right - X coordinate of the lower right corner of the rectangle. The value is a floating point number.\n         * @param { number } bottom - Y coordinate of the lower right corner of the rectangle. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawRect(left: number, top: number, right: number, bottom: number): void;\n        /**\n         * Draws a rounded rectangle.\n         * @param { RoundRect } roundRect - Indicates the RectRound object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawRoundRect(roundRect: RoundRect): void;\n        /**\n         * Draws two nested rounded rectangles. The outer rectangle boundary must contain the inner rectangle boundary.\n         * Otherwise, there is no drawing effect.\n         * @param { RoundRect } outer - Outer rounded rectangle.\n         * @param { RoundRect } inner - Inner rounded rectangle.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawNestedRoundRect(outer: RoundRect, inner: RoundRect): void;\n        /**\n         * Uses a brush to fill the drawable area of the canvas.\n         * @param { Brush } brush - Indicates the Brush object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawBackground(brush: Brush): void;\n        /**\n         * Draws a spot shadow and uses a given path to outline the ambient shadow.\n         * @param { Path } path - Path object, which is used to outline the shadow.\n         * @param { common2D.Point3d } planeParams - 3D vector, which is used to determine the z-axis offset of an occluder relative to the canvas,\n         * based on its x and y coordinates.\n         * @param { common2D.Point3d } devLightPos - Position of the light relative to the canvas.\n         * @param { number } lightRadius - Radius of the light. The value is a floating point number.\n         * @param { common2D.Color } ambientColor - Color of the ambient shadow.\n         * @param { common2D.Color } spotColor - Color of the spot shadow.\n         * @param { ShadowFlag } flag - Shadow flag.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: number, ambientColor: common2D.Color, spotColor: common2D.Color, flag: ShadowFlag): void;\n        /**\n         * Draws a spot shadow and uses a given path to outline the ambient shadow.\n         * @param { Path } path - Path object, which is used to outline the shadow.\n         * @param { common2D.Point3d } planeParams - 3D vector, which is used to calculate the offset in the Z axis.\n         * @param { common2D.Point3d } devLightPos - Position of the light relative to the canvas.\n         * @param { number } lightRadius - Radius of the light. The value is a floating point number.\n         * @param { common2D.Color | number } ambientColor - Ambient shadow color, represented by a 32-bit unsigned integer in hexadecimal ARGB format.\n         * @param { common2D.Color | number } spotColor - Spot shadow color, represented by a 32-bit unsigned integer in hexadecimal ARGB format.\n         * @param { ShadowFlag } flag - Indicates the flag to control opaque occluder, shadow, and light position.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: number, ambientColor: common2D.Color | number, spotColor: common2D.Color | number, flag: ShadowFlag): void;\n        /**\n         * Draws a circle. If the radius is less than or equal to zero, nothing is drawn. By default, black is used for filling.\n         * @param { number } x - X coordinate of the center of the circle. The value is a floating point number.\n         * @param { number } y - Y coordinate of the center of the circle. The value is a floating point number.\n         * @param { number } radius - Radius of the circle. The value is a floating point number greater than 0.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawCircle(x: number, y: number, radius: number): void;\n        /**\n         * Draw a pixelmap, with the upper left corner at (left, top).\n         * @param { image.PixelMap } pixelmap - PixelMap.\n         * @param { number } left - Left side of image.\n         * @param { number } top - Top side of image.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        /**\n         * Draws an image. The coordinates of the upper left corner of the image are (left, top).\n         * @param { image.PixelMap } pixelmap - PixelMap.\n         * @param { number } left - X coordinate of the upper left corner of the image. The value is a floating point number.\n         * @param { number } top - Y coordinate of the upper left corner of the image. The value is a floating point number.\n         * @param { SamplingOptions } samplingOptions - Sampling options. By default, the SamplingOptions object created using the no-argument constructor is used.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawImage(pixelmap: image.PixelMap, left: number, top: number, samplingOptions?: SamplingOptions): void;\n        /**\n         * Splits an image into multiple sections based on the lattice object's configuration and\n         * draws each section into the specified target rectangle on the canvas.\n         * The intersections of even-numbered rows and columns (starting from 0) are fixed points.\n         * If the fixed lattice area fits within the target rectangle, it will be drawn without scaling.\n         * Otherwise, it will be scaled proportionally to fit the target rectangle.\n         * Any remaining space will be filled by stretching or compressing the remaining sections to cover the entire target rectangle.\n         * @param { image.PixelMap } pixelmap - The source image.\n         * @param { Lattice } lattice - The area of source image.\n         * @param { common2D.Rect } dstRect - The area of destination canvas.\n         * @param { FilterMode } filterMode - Filter mode.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        drawImageLattice(pixelmap: image.PixelMap, lattice: Lattice, dstRect: common2D.Rect, filterMode: FilterMode): void;\n        /**\n         * Splits an image into nine sections using two horizontal and two vertical lines: four edge sections, four corner sections, and a central section.\n         * If the four corner sections are smaller than the target rectangle, they will be drawn in the target rectangle without scaling.\n         * Otherwise, they will be scaled to fit the target rectangle. Any remaining space will be filled by stretching or\n         * compressing the other five sections to cover the entire target rectangle.\n         * @param { image.PixelMap } pixelmap - PixelMap to split.\n         * @param { common2D.Rect } center - Central rectangle that divides the image into nine sections by extending its four edges.\n         * @param { common2D.Rect } dstRect - Target rectangle drawn on the canvas.\n         * @param { FilterMode } filterMode - Filter mode.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        drawImageNine(pixelmap: image.PixelMap, center: common2D.Rect, dstRect: common2D.Rect, filterMode: FilterMode): void;\n        /**\n         * Draws an image onto a specified area of the canvas.\n         * @param { image.PixelMap } pixelmap - The source image.\n         * @param { common2D.Rect } dstRect - Rectangle object, which specifies the area of the canvas onto which the image will be drawn.\n         * @param { SamplingOptions } samplingOptions - Sampling options.\n         * By default, the SamplingOptions object created using the no-argument constructor is used.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawImageRect(pixelmap: image.PixelMap, dstRect: common2D.Rect, samplingOptions?: SamplingOptions): void;\n        /**\n         * Draws a portion of an image onto a specified area of the canvas.\n         * @param { image.PixelMap } pixelmap - The source image.\n         * @param { common2D.Rect } srcRect - Rectangle object, which specifies the portion of the image to draw.\n         * @param { common2D.Rect } dstRect - Rectangle object, which specifies the area of the canvas onto which the image will be drawn.\n         * @param { SamplingOptions } samplingOptions - Sampling options.\n         * By default, the SamplingOptions object created using the no-argument constructor is used.\n         * @param { SrcRectConstraint } constraint - Constraint type of the source rectangle. The default value is STRICT.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawImageRectWithSrc(pixelmap: image.PixelMap, srcRect: common2D.Rect, dstRect: common2D.Rect, samplingOptions?: SamplingOptions, constraint?: SrcRectConstraint): void;\n        /**\n         * Draws the background color.\n         * @param { common2D.Color } color - The range of color channels must be [0, 255].\n         * @param { BlendMode } blendMode - Used to combine source color and destination. The default value is SRC_OVER.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawColor(color: common2D.Color, blendMode?: BlendMode): void;\n        /**\n         * Fills the drawable area of the canvas with the specified color and blend mode. This API provides better performance and is recommended.\n         * @param { number } alpha - Alpha channel value of the color in ARGB format.\n         * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down.\n         * @param { number } red - Red channel value of the color in ARGB format.\n         * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down.\n         * @param { number } green - Green channel value of the color in ARGB format.\n         * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down.\n         * @param { number } blue - Blue channel value of the color in ARGB format.\n         * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down.\n         * @param { BlendMode } blendMode - Blend mode. The default mode is SRC_OVER.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawColor(alpha: number, red: number, green: number, blue: number, blendMode?: BlendMode): void;\n        /**\n         * Fills the drawable area of the canvas with the specified color and blend mode.\n         * @param { number } color - Color in hexadecimal ARGB format.\n         * @param { BlendMode } blendMode - Blend mode. The default mode is SRC_OVER.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        drawColor(color: number, blendMode?: BlendMode): void;\n        /**\n         * Draws an oval on the canvas, where the shape and position of the oval are defined by its bounding rectangle.\n         * @param { common2D.Rect } oval - Rectangle. The oval inscribed within the rectangle is the oval to draw.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawOval(oval: common2D.Rect): void;\n        /**\n         * Draws an arc on the canvas, with the start angle and sweep angle specified.\n         * If the absolute value of the sweep angle exceeds 360 degrees, an ellipse is drawn.\n         * @param { common2D.Rect } arc - Rectangular boundary that encapsulates the oval including the arc.\n         * @param { number } startAngle - Start angle, in degrees. The value is a floating point number.\n         * When the degree is 0, the start point is located at the right end of the oval.\n         * A positive number indicates that the start point is placed clockwise,\n         * and a negative number indicates that the start point is placed counterclockwise.\n         * @param { number } sweepAngle - Angle to sweep, in degrees. The value is a floating point number.\n         * A positive number indicates a clockwise sweep, and a negative value indicates a counterclockwise swipe.\n         * The valid range is from -360 degrees to 360 degrees. If the absolute value of the sweep angle exceeds 360 degrees,\n         * an ellipse is drawn.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawArc(arc: common2D.Rect, startAngle: number, sweepAngle: number): void;\n        /**\n         * Draws an arc on the canvas. It enables you to define the start angle, sweep angle,\n         * and whether the arc's endpoints should connect to its center.\n         * @param { common2D.Rect } arc - Rectangular boundary that encapsulates the oval including the arc.\n         * @param { number } startAngle - Start angle, in degrees. The value is a floating point number.\n         * When the degree is 0, the start point is located at the right end of the oval.\n         * A positive number indicates that the start point is placed clockwise,\n         * and a negative number indicates that the start point is placed counterclockwise.\n         * @param { number } sweepAngle - Angle to sweep, in degrees. The value is a floating point number.\n         * A positive number indicates a clockwise sweep, and a negative value indicates a counterclockwise swipe.\n         * The swipe angle can exceed 360 degrees, and a complete ellipse is drawn.\n         * @param { boolean } useCenter - Whether the start point and end point of the arc are connected to its center.\n         * The value true means that they are connected to the center; the value false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        drawArcWithCenter(arc: common2D.Rect, startAngle: number, sweepAngle: number, useCenter: boolean): void;\n        /**\n         * Draw a point.\n         * @param { number } x - X coordinate of the point. The value is a floating point number.\n         * @param { number } y - Y coordinate of the point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawPoint(x: number, y: number): void;\n        /**\n         * Draws a group of points, line segments, or polygons on the canvas, with the specified drawing mode. An array is used to hold these points.\n         * @param { Array<common2D.Point> } points - Array that holds the points to draw. The length cannot be 0.\n         * @param { PointMode } mode - Mode in which the points are drawn. The default value is drawing.PointMode.POINTS.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawPoints(points: Array<common2D.Point>, mode?: PointMode): void;\n        /**\n         * Draws a custom path, which contains a set of path outlines. Each path outline can be open or closed.\n         * @param { Path } path - Path object to draw.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawPath(path: Path): void;\n        /**\n         * Draws a line segment from the start point to the end point. If the coordinates of the start point are the same as those of the end point,\n         * nothing is drawn.\n         * @param { number } x0 - X coordinate of the start point of the line segment. The value is a floating point number.\n         * @param { number } y0 - Y coordinate of the start point of the line segment. The value is a floating point number.\n         * @param { number } x1 - X coordinate of the end point of the line segment. The value is a floating point number.\n         * @param { number } y1 - Y coordinate of the end point of the line segment. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawLine(x0: number, y0: number, x1: number, y1: number): void;\n        /**\n         * Draws a single character. If the typeface of the current font does not support the character to draw,\n         * the system typeface is used to draw the character.\n         * @param { string } text - Single character to draw. The length of the string must be 1.\n         * @param { Font } font - Font object.\n         * @param { number } x - X coordinate of the left point (red point in the figure below) of the character baseline (blue line in the figure below).\n         * The value is a floating point number.\n         * @param { number } y - Y coordinate of the left point (red point in the figure below) of the character baseline (blue line in the figure below).\n         * The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawSingleCharacter(text: string, font: Font, x: number, y: number): void;\n        /**\n         * Draws a text blob. If the typeface used to construct blob does not support a character, that character will not be drawn.\n         * @param { TextBlob } blob - TextBlob to draw.\n         * @param { number } x - X coordinate of the left point (red point in the figure below) of the text baseline (blue line in the figure below).\n         * The value is a floating point number.\n         * @param { number } y - Y coordinate of the left point (red point in the figure below) of the text baseline (blue line in the figure below).\n         * The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        drawTextBlob(blob: TextBlob, x: number, y: number): void;\n        /**\n         * Draws a PixelMap based on a mesh, where mesh vertices are evenly distributed across the PixelMap.\n         * @param { image.PixelMap } pixelmap - PixelMap to draw.\n         * @param { number } meshWidth - Number of columns in the mesh. The value is an integer greater than 0.\n         * @param { number } meshHeight - Number of rows in the mesh. The value is an integer greater than 0.\n         * @param { Array<number> } vertices - Array of vertices, which specify the position to draw.\n         * The value is a floating-point array and the size must be ((meshWidth+1) * (meshHeight+1) + vertOffset) * 2.\n         * @param { number } vertOffset - Number of vert elements to skip before drawing. The value is an integer greater than or equal to 0.\n         * @param { Array<number> } colors - Array of colors, which specify the color at each vertex.\n         * The value is an integer array and can be null. The size must be (meshWidth+1) * (meshHeight+1) + colorOffset.\n         * @param { number } colorOffset - Number of color elements to skip before drawing. The value is an integer greater than or equal to 0.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawPixelMapMesh(pixelmap: image.PixelMap, meshWidth: number, meshHeight: number, vertices: Array<number>, vertOffset: number, colors: Array<number>, colorOffset: number): void;\n        /**\n         * Draws a region.\n         * @param { Region } region - Region to draw.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        drawRegion(region: Region): void;\n        /**\n         * Attaches a pen to the canvas. When you draw on the canvas, the pen's style is used to outline shapes.\n         * @param { Pen } pen - Pen object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        attachPen(pen: Pen): void;\n        /**\n         * Attaches a brush to the canvas. When you draw on the canvas, the brush's style is used to fill the interior of shapes.\n         * @param { Brush } brush - Brush object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        attachBrush(brush: Brush): void;\n        /**\n         * Detaches the pen from the canvas. When you draw on the canvas, the pen is no longer used to outline shapes.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        detachPen(): void;\n        /**\n         * Detaches the brush from the canvas. When you draw on the canvas, the brush is no longer used to fill the interior of shapes.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        detachBrush(): void;\n        /**\n         * Saves the canvas states (canvas matrix and drawable area) to the top of the stack. This API must be used in pair with restore.\n         * @returns { number } Number of canvas statuses. The value is a positive integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        save(): number;\n        /**\n         * Saves the matrix and cropping region of the canvas, and allocates a PixelMap for subsequent drawing.\n         * If you call restore, changes made to the matrix and clipping region are discarded, and the PixelMap is drawn.\n         * @param { common2D.Rect | null} rect - Rect object, which is used to limit the size of the graphics layer.\n         * The default value is the current canvas size.\n         * @param { Brush | null} brush - Brush object. The alpha value, filter effect, and blend mode of the brush are applied when the bitmap is drawn.\n         * If null is passed in, no effect is applied.\n         * @returns { number } Number of canvas statuses that have been saved. The value is a positive integer.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        saveLayer(rect?: common2D.Rect | null, brush?: Brush | null): number;\n        /**\n         * Clears the canvas with a given color. This API has the same effect as drawcolor.\n         * @param { common2D.Color } color - Color in ARGB format. Each color channel is an integer ranging from 0 to 255.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        clear(color: common2D.Color): void;\n        /**\n         * Clears the canvas with a given color.\n         * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        clear(color: common2D.Color | number): void;\n        /**\n         * Restores the canvas state (canvas matrix and clipping area) saved on the top of the stack.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        restore(): void;\n        /**\n         * Restores the canvas state (canvas matrix and clipping area) to a specified number.\n         * @param { number } count - Depth of the canvas statuses to restore. The value is an integer.\n         * If the value is less than or equal to 1, the canvas is restored to the initial state.\n         * If the value is greater than the number of canvas statuses that have been saved, no operation is performed.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        restoreToCount(count: number): void;\n        /**\n         * Obtains the number of canvas states (canvas matrix and clipping area) saved in the stack.\n         * @returns { number } Number of canvas statuses that have been saved. The value is a positive integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getSaveCount(): number;\n        /**\n         * Obtains the canvas width.\n         * @returns { number } Canvas width. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getWidth(): number;\n        /**\n         * Obtains the canvas height.\n         * @returns { number } Canvas height. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getHeight(): number;\n        /**\n         * Obtains the bounds of the cropping region of the canvas.\n         * @returns { common2D.Rect } Rect object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLocalClipBounds(): common2D.Rect;\n        /**\n         * Obtains the canvas matrix.\n         * @returns { Matrix } Canvas matrix.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getTotalMatrix(): Matrix;\n        /**\n         * Applies a scaling matrix on top of the current canvas matrix (identity matrix by default).\n         * Subsequent drawing and clipping operations will automatically have a scaling effect applied to the shapes and positions.\n         * @param { number } sx - Scale ratio on the X axis. The value is a floating point number.\n         * @param { number } sy - Scale ratio on the Y axis. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        scale(sx: number, sy: number): void;\n        /**\n         * Applies a skewing matrix on top of the current canvas matrix (identity matrix by default).\n         * Subsequent drawing and clipping operations will automatically have a skewing effect applied to the shapes and positions.\n         * @param { number } sx - Amount of tilt on the X axis. The value is a floating point number.\n         * A positive number tilts the drawing rightwards along the positive direction of the Y axis,\n         * and a negative number tilts the drawing leftwards along the positive direction of the Y axis.\n         * @param { number } sy - Amount of tilt on the Y axis. The value is a floating point number.\n         * A positive number tilts the drawing downwards along the positive direction of the X axis,\n         * and a negative number tilts the drawing upwards along the positive direction of the X axis.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        skew(sx: number, sy: number): void;\n        /**\n         * Applies a rotation matrix on top of the current canvas matrix (identity matrix by default).\n         * Subsequent drawing and clipping operations will automatically have a rotation effect applied to their shapes and positions.\n         * @param { number } degrees - Angle to rotate, in degrees. The value is a floating point number.\n         * A positive value indicates a clockwise rotation, and a negative value indicates a counterclockwise rotation.\n         * @param { number } sx - X coordinate of the rotation center. The value is a floating point number.\n         * @param { number } sy - Y coordinate of the rotation center. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rotate(degrees: number, sx: number, sy: number): void;\n        /**\n         * Applies a translation matrix on top of the current canvas matrix (identity matrix by default).\n         * Subsequent drawing and clipping operations will automatically have a translation effect applied to the shapes and positions.\n         * @param { number } dx - Distance to translate on the X axis. The value is a floating point number.\n         * @param { number } dy - Distance to translate on the Y axis. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        translate(dx: number, dy: number): void;\n        /**\n         * Clips the drawable area of the canvas using a custom path.\n         * @param { Path } path - To combine with clip.\n         * @param { ClipOp } clipOp - Clip mode. The default value is INTERSECT.\n         * @param { boolean } doAntiAlias - Whether to enable anti-aliasing. The value true means to enable anti-aliasing,\n         * and false means the opposite. The default value is false.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        clipPath(path: Path, clipOp?: ClipOp, doAntiAlias?: boolean): void;\n        /**\n         * Clips the drawable area of the canvas using a rectangle.\n         * @param { common2D.Rect } rect - To combine with clipping area.\n         * @param { ClipOp } clipOp - Clip mode. The default value is INTERSECT.\n         * @param { boolean } doAntiAlias - Whether to enable anti-aliasing. The value true means to enable anti-aliasing,\n         * and false means the opposite. The default value is false.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        clipRect(rect: common2D.Rect, clipOp?: ClipOp, doAntiAlias?: boolean): void;\n        /**\n         * Multiplies the current canvas matrix by the incoming matrix on the left. This API does not affect previous drawing operations,\n         * but subsequent drawing and clipping operations will be influenced by this matrix in terms of shape and position.\n         * @param { Matrix } matrix - Declares functions related to the matrix object in the drawing module.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        concatMatrix(matrix: Matrix): void;\n        /**\n         * Clips a region on the canvas.\n         * @param { Region } region - Region object, which indicates the range to clip.\n         * @param { ClipOp } clipOp - Clipping mode. The default value is INTERSECT.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        clipRegion(region: Region, clipOp?: ClipOp): void;\n        /**\n         * Clips a rounded rectangle on the canvas.\n         * @param { RoundRect } roundRect - To combine with clipping area.\n         * @param { ClipOp } clipOp - Clipping mode. The default value is INTERSECT.\n         * @param { boolean } doAntiAlias - Whether to enable anti-aliasing. The value true means to enable anti-aliasing,\n         * and false means the opposite. The default value is false.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        clipRoundRect(roundRect: RoundRect, clipOp?: ClipOp, doAntiAlias?: boolean): void;\n        /**\n         * Checks whether the region that can be drawn is empty after clipping.\n         * @returns { boolean } Returns true if drawable area is empty.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isClipEmpty(): boolean;\n        /**\n         * Sets a matrix for the canvas. Subsequent drawing and clipping operations will be affected by this matrix in terms of shape and position.\n         * @param { Matrix } matrix - Declares functions related to the matrix object in the drawing module.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setMatrix(matrix: Matrix): void;\n        /**\n         * Resets the matrix of this canvas to an identity matrix.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        resetMatrix(): void;\n        /**\n         * Checks whether the path is not intersecting with the canvas area. The canvas area includes its boundaries.\n         * @param { Path } path - Path to draw.\n         * @returns { boolean } Returns true if path is not intersect; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        quickRejectPath(path: Path): boolean;\n        /**\n         * Checks whether the rectangle is not intersecting with the canvas area. The canvas area includes its boundaries.\n         * @param { common2D.Rect } rect - Rectangle to determines.\n         * @returns { boolean } Returns true if rect and region is not intersect; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        quickRejectRect(rect: common2D.Rect): boolean;\n    }\n    /**\n     * Enumerates the canvas clipping modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum ClipOp {\n        /**\n         * Clips a specified area. That is, the difference set is obtained.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DIFFERENCE = 0,\n        /**\n         * Retains a specified area. That is, the intersection is obtained.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INTERSECT = 1\n    }\n    /**\n     * Describes a series of consecutive glyphs with the same attributes in a text blob.\n     * @typedef TextBlobRunBuffer\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    interface TextBlobRunBuffer {\n        /**\n         * Index of the glyph. The value is an integer. If a floating point number is passed in, the value is rounded down.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        glyph: number;\n        /**\n         * X coordinate of the start point of the text blob. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        positionX: number;\n        /**\n         * Y coordinate of the start point of the text blob. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        positionY: number;\n    }\n    /**\n     * Enumerates the text encoding types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    enum TextEncoding {\n        /**\n         * One byte is used to indicate UTF-8 or ASCII characters.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        TEXT_ENCODING_UTF8 = 0,\n        /**\n         * Two bytes are used to indicate most Unicode characters.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        TEXT_ENCODING_UTF16 = 1,\n        /**\n         * Four bytes are used to indicate all Unicode characters.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        TEXT_ENCODING_UTF32 = 2,\n        /**\n         * Two bytes are used to indicate the glyph index.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        TEXT_ENCODING_GLYPH_ID = 3\n    }\n    /**\n     * Defines a block consisting of one or more characters with the same font.\n     *\n     * class TextBlob\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class TextBlob {\n        /**\n         * Converts a value of the string type into a TextBlob object.\n         * @param { string } text - Content to be used for drawing the text blob.\n         * @param { Font } font - Specify text size, font, text scale, etc.\n         * @param { TextEncoding } encoding - Encoding type. The default value is TEXT_ENCODING_UTF8.\n         * Currently, only TEXT_ENCODING_UTF8 takes effect, and other encoding types are treated as TEXT_ENCODING_UTF8.\n         * @returns { TextBlob } TextBlob object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static makeFromString(text: string, font: Font, encoding?: TextEncoding): TextBlob;\n        /**\n         * Creates a TextBlob object from the text.\n         * The coordinates of each font in the TextBlob object are determined by the coordinate information in the points array.\n         * @param { string } text - Content to be used for drawing the text blob.\n         * @param { number } len - Number of fonts. The value is an integer and is obtained from countText.\n         * @param { common2D.Point[] } points - Array of points, which are used to specify the coordinates of each font.\n         * The array length must be the same as the value of len.\n         * @param { Font } font - Specify text size, font, text scale, etc.\n         * @returns { TextBlob } TextBlob object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static makeFromPosText(text: string, len: number, points: common2D.Point[], font: Font): TextBlob;\n        /**\n         * Creates a Textblob object based on the RunBuffer information.\n         * @param { Array<TextBlobRunBuffer> } pos - The array of TextBlobRunBuffer.\n         * @param { Font } font - Font used for this run.\n         * @param { common2D.Rect } bounds - Optional run bounding box. The default value is null;\n         * @returns { TextBlob } TextBlob object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static makeFromRunBuffer(pos: Array<TextBlobRunBuffer>, font: Font, bounds?: common2D.Rect): TextBlob;\n        /**\n         * Obtains the rectangular bounding box of the text blob.\n         * @returns { common2D.Rect } Rect object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        bounds(): common2D.Rect;\n        /**\n         * Obtains the unique, non-zero identifier of this TextBlob object.\n         * @returns { number } Unique ID.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        uniqueID(): number;\n    }\n    /**\n     * Provides an interface to the drawing, and describe the arguments for a font.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @crossplatform\n     * @since 20\n     */\n    class TypefaceArguments {\n        /**\n         * Constructor for the TypefaceArguments.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        constructor();\n        /**\n         * Adds variation axis for the TypefaceArguments.\n         * @param { string } axis  - Indicates the axis tag, which must contain four ASCII characters.\n         * @param { number } value  - Indicates the value of the axis field.\n         * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        addVariation(axis: string, value: number);\n    }\n    /**\n     * Describes the style of a typeface, such as SimSun or KaiTi.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class Typeface {\n        /**\n         * Obtains the name of the typeface family, which is the name given to a collection of related typeface designs.\n         * @returns { string } Family name.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        getFamilyName(): string;\n        /**\n         * Generate typeface from current typeface and TypefaceArguments.\n         * @param { TypefaceArguments } typefaceArguments - TypefaceArguments for typeface.\n         * @returns { Typeface } Typeface.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        makeFromCurrent(typefaceArguments: TypefaceArguments): Typeface;\n        /**\n         * Constructs a typeface from a file.\n         * @param { string } filePath - file path for typeface.\n         * @returns { Typeface } Typeface.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static makeFromFile(filePath: string): Typeface;\n        /**\n         * Constructs a typeface from a file, which must be stored in the resources/rawfile directory of the application project.\n         * @param { Resource } rawfile - Resource object corresponding to the file.\n         * Currently, only resource objects referenced in rawfile format are supported.\n         * The corresponding format is rawfile('filePath'), where filePath is the relative path of the file to the resources/rawfile directory in the project.\n         * If the file is stored in resources/rawfile, the reference format is rawfile('HarmonyOS_Sans_Bold.ttf').\n         * If the file is stored in a subdirectory, for example, in resources/rawfile/ttf, the reference format is rawfile('ttf/HarmonyOS_Sans_Bold.ttf').\n         * @returns { Typeface } Typeface.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static makeFromRawFile(rawfile: Resource): Typeface;\n        /**\n         * Generate typeface from file and TypefaceArguments.\n         * @param { string } filePath - file path for typeface.\n         * @param { TypefaceArguments } typefaceArguments - TypefaceArguments for typeface.\n         * @returns { Typeface } Typeface.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static makeFromFileWithArguments(filePath: string, typefaceArguments: TypefaceArguments): Typeface;\n        /**\n         * Generate typeface from Rawfile and TypefaceArguments.\n         * @param { Resource } rawfile - RawFile for typeface.\n         * @param { TypefaceArguments } typefaceArguments - TypefaceArguments for typeface.\n         * @returns { Typeface } Typeface.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static makeFromRawFileWithArguments(rawfile: Resource, typefaceArguments: TypefaceArguments): Typeface;\n    }\n    /**\n     * Enumerates the font edging types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FontEdging {\n        /**\n         * No anti-aliasing processing is used.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ALIAS = 0,\n        /**\n         * Uses anti-aliasing to smooth the jagged edges.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ANTI_ALIAS = 1,\n        /**\n         * Uses sub-pixel anti-aliasing to provide a smoother effect for jagged edges.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SUBPIXEL_ANTI_ALIAS = 2\n    }\n    /**\n     * Enumerates the font hinting types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FontHinting {\n        /**\n         * No font hinting is used.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NONE = 0,\n        /**\n         * Slight font hinting is used to improve contrast.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SLIGHT = 1,\n        /**\n         * Normal font hinting is used to improve contrast.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NORMAL = 2,\n        /**\n         * Full font hinting is used to improve contrast.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FULL = 3\n    }\n    /**\n     * Describes the attributes, such as the size, used for drawing text.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class Font {\n        /**\n         * Enables subpixel font rendering.\n         * @param { boolean } isSubpixel - Whether to enable subpixel font rendering.\n         * The value true means to enable subpixel font rendering, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        enableSubpixel(isSubpixel: boolean): void;\n        /**\n         * Enables emboldened fonts.\n         * @param { boolean } isEmbolden - Whether to enable emboldened fonts.\n         * The value true means to enable emboldened fonts, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        enableEmbolden(isEmbolden: boolean): void;\n        /**\n         * Enables linear font scaling.\n         * @param { boolean } isLinearMetrics - Whether to enable linear font scaling.\n         * The value true means to enable linear font scaling, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        enableLinearMetrics(isLinearMetrics: boolean): void;\n        /**\n         * Sets the text size.\n         * @param { number } textSize - Text size. The value is a floating point number.\n         * If a negative number is passed in, the size is set to 0. If the size is 0, the text drawn will not be displayed.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setSize(textSize: number): void;\n        /**\n         * Obtains the text size.\n         * @returns { number } Text size. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        getSize(): number;\n        /**\n         * Sets the typeface style (including attributes such as font name, weight, and italic) for the font.\n         * @param { Typeface } typeface - Font and style used to draw text.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setTypeface(typeface: Typeface): void;\n        /**\n         * Obtains the typeface.\n         * @returns { Typeface } Typeface object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        getTypeface(): Typeface;\n        /**\n         * Obtains the font metrics of the typeface.\n         * @returns { FontMetrics } The fontMetrics value returned to the caller.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        getMetrics(): FontMetrics;\n        /**\n         * Measures the width of a single character.\n         * If the typeface of the current font does not support the character to measure, the system typeface is used to measure the character width.\n         * @param { string } text - Single character to measure. The length of the string must be 1.\n         * @returns { number } Width of the character. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        measureSingleCharacter(text: string): number;\n        /**\n         * Measures the text width.\n         * @param { string } text - Text Symbol Content.\n         * @param { TextEncoding } encoding - Encoding format.\n         * @returns { number } Width of the text. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        measureText(text: string, encoding: TextEncoding): number;\n        /**\n         * Sets a horizontal scale factor for this font.\n         * @param { number } scaleX - Horizontal scale factor. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setScaleX(scaleX: number): void;\n        /**\n         * Sets a horizontal skew factor for this font.\n         * @param { number } skewX - Horizontal skew factor.\n         * A positive number means a skew to the left, and a negative number means a skew to the right. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setSkewX(skewX: number): void;\n        /**\n         * Sets a font edging effect.\n         * @param { FontEdging } edging - Font edging effect.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setEdging(edging: FontEdging): void;\n        /**\n         * Sets a font hinting effect.\n         * @param { FontHinting } hinting - Font hinting effect.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setHinting(hinting: FontHinting): void;\n        /**\n         * Obtains the number of glyphs represented by text.\n         * @param { string } text - Indicates the character storage encoded with text encoding.\n         * @returns { number } Returns the count of text.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        countText(text: string): number;\n        /**\n         * Sets whether to request that baselines be snapped to pixels when the current canvas matrix is axis aligned.\n         * @param { boolean } isBaselineSnap - Whether to request that baselines be snapped to pixels.\n         * The value true means to request that baselines be snapped to pixels, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setBaselineSnap(isBaselineSnap: boolean): void;\n        /**\n         * Checks whether baselines are requested to be snapped to pixels when the current canvas matrix is axis aligned.\n         * @returns { boolean } Check result. The value true means that the baselines are requested to be snapped to pixels,\n         * and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isBaselineSnap(): boolean;\n        /**\n         * Sets whether to use bitmaps in this font.\n         * @param { boolean } isEmbeddedBitmaps - Whether to use bitmaps in the font. The value true means to use bitmaps in the font,\n         * and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setEmbeddedBitmaps(isEmbeddedBitmaps: boolean): void;\n        /**\n         * Checks whether bitmaps are used in this font.\n         * @returns { boolean } Check result. The value true means that the bitmaps are used, and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isEmbeddedBitmaps(): boolean;\n        /**\n         * Sets whether to forcibly use auto hinting, that is, whether to always hint glyphs.\n         * @param { boolean } isForceAutoHinting - Whether to forcibly use auto hinting. The value true means to forcibly use auto hinting,\n         * and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setForceAutoHinting(isForceAutoHinting: boolean): void;\n        /**\n         * Checks whether auto hinting is forcibly used.\n         * @returns { boolean } Check result. The value true means that auto hinting is forcibly used, and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isForceAutoHinting(): boolean;\n        /**\n         * Obtains the width of each glyph in an array.\n         * @param { Array<number> } glyphs - Glyph array, which can be generated by textToGlyphs.\n         * @returns { Array<number> } Glyph array, which can be generated by textToGlyphs.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getWidths(glyphs: Array<number>): Array<number>;\n        /**\n         * Converts text into glyph indexes.\n         * @param { string } text - Text string.\n         * @param { number } glyphCount - Number of glyphs represented by the text. The value must be the same as the value obtained from countText.\n         * The default value is the number of characters in the text string. The value is an integer.\n         * @returns { Array<number> } Returns the storage for glyph indices.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textToGlyphs(text: string, glyphCount?: number): Array<number>;\n        /**\n         * Checks whether sub-pixel rendering is used for this font.\n         * @returns { boolean } Check result. The value true means that sub-pixel rendering is used, and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isSubpixel(): boolean;\n        /**\n         * Checks whether linear scaling is used for this font.\n         * @returns { boolean } Checks whether linear scaling is used for this font.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isLinearMetrics(): boolean;\n        /**\n         * Obtains the horizontal skew factor of this font.\n         * @returns { number } Horizontal skew factor.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getSkewX(): number;\n        /**\n         * Checks whether the bold effect is set for this font.\n         * @returns { boolean } Check result. The value true means that the bold effect is set, and false means the opposite.\n         * returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isEmbolden(): boolean;\n        /**\n         * Obtains the horizontal scale ratio of this font.\n         * @returns { number } Horizontal scale ratio.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getScaleX(): number;\n        /**\n         * Obtains the font hinting effect.\n         * @returns { FontHinting } Font hinting effect.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getHinting(): FontHinting;\n        /**\n         * Obtains the font edging effect.\n         * @returns { FontEdging } Font edging effect.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getEdging(): FontEdging;\n        /**\n         * Obtains the outline path of a glyph.\n         * @param { number } index - Index of the glyph.\n         * @returns { Path } Outline path of the glyph.\n         * Note: Path use y-axis-goes-down system, y axis is inverted to the y-axis-goes-up system.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        createPathForGlyph(index: number): Path;\n        /**\n         * Obtains the rectangular bounding box of each glyph in an array.\n         * @param { Array<number> } glyphs - Glyph array, which can be generated by textToGlyphs.\n         * @returns { Array<common2D.Rect> } Array that holds the rectangular bounding boxes.\n         * Note: 1. Rect use y-axis-goes-down system, y axis is inverted to the y-axis-goes-up system.\n         * <br>2. Rect use two points(left-bottom & right-top) to describe the bound.\n         * <br>3. The bound rect will be snap to integral boundaries.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getBounds(glyphs: Array<number>): Array<common2D.Rect>;\n        /**\n         * Obtains the outline path of a text.\n         * @param { string } text - UTF-8 text-encoded characters.\n         * @param { number } byteLength - Length of the outline path,\n         * which is obtained based on the minimum value between the passed value of byteLength and the actual text byte size.\n         * @param { number } x - X coordinate of the text in the drawing area, with the origin as the start point.\n         * @param { number } y - Y coordinate of the text in the drawing area, with the origin as the start point.\n         * @returns { Path } Outline path of the text.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getTextPath(text: string, byteLength: number, x: number, y: number): Path;\n        /**\n         * Sets whether to follow the theme font. When followed is set to true,\n         * the theme font is used if it is enabled by the system and no typeface is set.\n         * @param { boolean } followed - Whether to follow the theme font.\n         * The value true means to follow the theme font, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 15\n         */\n        setThemeFontFollowed(followed: boolean): void;\n        /**\n         * Checks whether the font follows the theme font. By default, the font follows the theme font.\n         * @returns { boolean } Check result. The value true means that the theme font is followed, and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 15\n         */\n        isThemeFontFollowed(): boolean;\n    }\n    /**\n     * Enumerates the font measurement flags, which is used to specify whether a field in the font measurement information is valid.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FontMetricsFlags {\n        /**\n         * The underlineThickness field in the FontMetrics struct is valid.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        UNDERLINE_THICKNESS_VALID = 1 << 0,\n        /**\n         * The underlinePosition field in the FontMetrics struct is valid.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        UNDERLINE_POSITION_VALID = 1 << 1,\n        /**\n         * The strikethroughThickness field in the FontMetrics struct is valid.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        STRIKETHROUGH_THICKNESS_VALID = 1 << 2,\n        /**\n         * The strikethroughPosition field in the FontMetrics struct is valid.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        STRIKETHROUGH_POSITION_VALID = 1 << 3,\n        /**\n         * The boundary metrics (such as top, bottom, xMin, and xMax) in the FontMetrics struct are invalid.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BOUNDS_INVALID = 1 << 4\n    }\n    /**\n     * Describes the attributes that describe the font size and layout. A typeface has similar font metrics.\n     * @typedef FontMetrics\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    interface FontMetrics {\n        /**\n         * Font measurement flags that are valid.\n         * @type { ?FontMetricsFlags }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        flags?: FontMetricsFlags;\n        /**\n         * Maximum distance from the baseline to the highest coordinate of the text. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        top: number;\n        /**\n         * Distance from the baseline to the highest coordinate of the text. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        ascent: number;\n        /**\n         * Distance from the baseline to the lowest coordinate of the text. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        descent: number;\n        /**\n         * Maximum distance from the baseline to the lowest coordinate of the text. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        bottom: number;\n        /**\n         * Interline spacing, that is, the distance from the descent of one line of text to the ascent of the next line.\n         * The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        leading: number;\n        /**\n         * Average character width.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        avgCharWidth?: number;\n        /**\n         * Maximum character width.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        maxCharWidth?: number;\n        /**\n         * Horizontal distance from the leftmost edge of any glyph bounding box to the origin.\n         * This value is usually less than 0, indicating the minimum horizontal coordinate across all glyph bounding boxes.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        xMin?: number;\n        /**\n         * Horizontal distance from the rightmost edge of any glyph bounding box to the origin.\n         * The value is a positive number, indicating the maximum horizontal coordinate across all glyph bounding boxes.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        xMax?: number;\n        /**\n         * Height of the lowercase letter x. The value is usually a negative value.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        xHeight?: number;\n        /**\n         * Height of a capital letter. The value is usually a negative value.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        capHeight?: number;\n        /**\n         * Thickness of the underline.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        underlineThickness?: number;\n        /**\n         * Vertical distance from the baseline to the top of the underline. The value is usually a positive number.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        underlinePosition?: number;\n        /**\n         * Thickness of the strikethrough.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        strikethroughThickness?: number;\n        /**\n         * Vertical distance from the baseline to the bottom of the strikethrough. The value is usually a negative value.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        strikethroughPosition?: number;\n    }\n    /**\n     * Implements a lattice object, which is used to divide an image by lattice.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class Lattice {\n        /**\n         * Divides the image into lattices. The lattices on both even columns and even rows are fixed,\n         * and they are drawn at their original size if the target is large enough.\n         * If the target is too small to hold the fixed lattices, all the fixed lattices are scaled down to fit the target,\n         * and the lattices that are not on even columns and even rows are scaled to accommodate the remaining space.\n         * @param { Array<number> } xDivs - Array of X coordinates used to divide the image. The value is an integer.\n         * @param { Array<number> } yDivs - Array of Y coordinates used to divide the image. The value is an integer.\n         * @param { number } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5].\n         * @param { number } fYCount - Size of the array that holds the Y coordinates. The value range is [0, 5].\n         * @param { common2D.Rect | null } fBounds - Source bounds to draw. The rectangle parameter must be an integer.\n         * The default value is the rectangle size of the original image. If the rectangle parameter is a decimal,\n         * the decimal part is discarded and converted into an integer.\n         * @param { Array<RectType> | null } fRectTypes - Array that holds the rectangle types. The default value is null.\n         * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1).\n         * @param { Array<common2D.Color> | null } fColors - Array that holds the colors used to fill the lattices. The default value is null.\n         * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1).\n         * @returns { Lattice } Lattice object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createImageLattice(xDivs: Array<number>, yDivs: Array<number>, fXCount: number, fYCount: number, fBounds?: common2D.Rect | null, fRectTypes?: Array<RectType> | null, fColors?: Array<common2D.Color> | null): Lattice;\n        /**\n         * Divides the image into lattices. The lattices on both even columns and even rows are fixed,\n         * and they are drawn at their original size if the target is large enough.\n         * If the target is too small to hold the fixed lattices, all the fixed lattices are scaled down to fit the target,\n         * and the lattices that are not on even columns and even rows are scaled to accommodate the remaining space.\n         * @param { Array<number> } xDivs - Array of X coordinates used to divide the image. The value is an integer.\n         * @param { Array<number> } yDivs - Array of Y coordinates used to divide the image. The value is an integer.\n         * @param { number } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5].\n         * @param { number } fYCount - Size of the array that holds the Y coordinates. The value range is [0, 5].\n         * @param { common2D.Rect | null } fBounds - Source bounds to draw. The rectangle parameter must be an integer.\n         * The default value is the rectangle size of the original image. If the rectangle parameter is a decimal,\n         * the decimal part is discarded and converted into an integer.\n         * @param { Array<RectType> | null } fRectTypes - Array that holds the rectangle types. The default value is null.\n         * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1).\n         * @param { Array<number> | null } fColors - Array that holds the colors used to fill the lattices.\n         * Each color is represented by a 32-bit unsigned integer in hexadecimal ARGB format.\n         * The default value is null. If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1).\n         * @returns { Lattice } Lattice object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static createImageLattice(xDivs: Array<number>, yDivs: Array<number>, fXCount: number, fYCount: number, fBounds?: common2D.Rect | null, fRectTypes?: Array<RectType> | null, fColors?: Array<number> | null): Lattice;\n    }\n    /**\n     * Enumerates the types of rectangles used to fill the lattices. This enum is used only in Lattice.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum RectType {\n        /**\n         * Draws an image into the lattice.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DEFAULT = 0,\n        /**\n         * Sets the lattice to transparent.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TRANSPARENT = 1,\n        /**\n         * Draws the colors in the fColors array in Lattice into the lattice.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FIXEDCOLOR = 2\n    }\n    /**\n     * Implements a mask filter.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class MaskFilter {\n        /**\n         * Creates a mask filter with a blur effect.\n         * @param { BlurType } blurType - Blur type.\n         * @param { number } sigma - Standard deviation of the Gaussian blur to apply. The value must be a floating point number greater than 0.\n         * @returns { MaskFilter } MaskFilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createBlurMaskFilter(blurType: BlurType, sigma: number): MaskFilter;\n    }\n    /**\n     * Enumerates the styles of the dashed path effect.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    enum PathDashStyle {\n        /**\n         * Translates only, not rotating with the path.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        TRANSLATE = 0,\n        /**\n         * Rotates with the path.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        ROTATE = 1,\n        /**\n         * Rotates with the path and stretches or compresses at turns to enhance smoothness.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        MORPH = 2\n    }\n    /**\n     * Implements a path effect.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class PathEffect {\n        /**\n         * Creates a PathEffect object that converts a path into a dotted line.\n         * @param { Array<number> } intervals - Array of ON and OFF lengths of dotted lines.\n         * The number of arrays must be an even number and be greater than or equal to 2.\n         * @param { number } phase - Offset used during drawing. The value is a floating point number.\n         * @returns { PathEffect } PathEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createDashPathEffect(intervals: Array<number>, phase: number): PathEffect;\n        /**\n         * Creates a path effect that transforms the sharp angle between line segments into a rounded corner with the specified radius.\n         * @param { number } radius - Radius of the rounded corner. The value must be greater than 0. The value is a floating point number.\n         * @returns { PathEffect } PathEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createCornerPathEffect(radius: number): PathEffect;\n        /**\n         * Creates an effect that segments the path and scatters the segments in an irregular pattern along the path.\n         * @param { number } segLength - Distance along the path at which each segment is fragmented. The value is a floating point number.\n         * If a negative number or the value 0 is passed in, no effect is created.\n         * @param { number } dev - Maximum amount by which the end points of the segments can be randomly displaced during rendering.\n         * The value is a floating-point number.\n         * @param { number } seedAssist - Optional parameter to assist in generating a pseudo-random seed for the effect.\n         * The default value is 0, and the value is a 32-bit unsigned integer.\n         * @returns { PathEffect } PathEffect object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static createDiscretePathEffect(segLength: number, dev: number, seedAssist?: number): PathEffect;\n        /**\n         * Creates a path effect by sequentially applying the inner effect and then the outer effect.\n         * @param { PathEffect } outer - Path effect that is applied second, overlaying the first effect.\n         * @param { PathEffect } inner - Inner path effect that is applied first.\n         * @returns { PathEffect } PathEffect object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static createComposePathEffect(outer: PathEffect, inner: PathEffect): PathEffect;\n        /**\n        * Creates a dashed path effect based on the shape described by a path.\n        * @param { Path } path - Path that defines the shape to be used for filling each dash in the pattern.\n        * @param { number } advance - Distance between two consecutive dashes. The value is a floating point number greater than 0.\n        * Otherwise, an error code is thrown.\n        * @param { number } phase - Starting offset of the dash pattern. The value is a floating point number.\n        * The actual offset used is the absolute value of this value modulo the value of advance.\n        * @param { PathDashStyle } style - Style of the dashed path effect.\n        * @returns { PathEffect } PathEffect object.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n        * @static\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 18\n        */\n        static createPathDashEffect(path: Path, advance: number, phase: number, style: PathDashStyle): PathEffect;\n        /**\n         * Creates an overlay path effect based on two distinct path effects.\n         * Different from createComposePathEffect, this API applies each effect separately and then displays them as a simple overlay.\n         * @param { PathEffect } firstPathEffect - First path effect.\n         * @param { PathEffect } secondPathEffect - Second path effect.\n         * @returns { PathEffect } PathEffect object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static createSumPathEffect(firstPathEffect: PathEffect, secondPathEffect: PathEffect): PathEffect;\n    }\n    /**\n     * Implements the shader effect. After a shader effect is set for a pen or brush,\n     * the shader effect instead of the color attribute is used for drawing. In this case,\n     * the alpha value set for the pen or brush still takes effect.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class ShaderEffect {\n        /**\n         * Creates a ShaderEffect object with a single color.\n         * @param { number } color - Color in the ARGB format. The value is a 32-bit unsigned integer.\n         * @returns { ShaderEffect } Returns the shader with single color ShaderEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createColorShader(color: number): ShaderEffect;\n        /**\n         * Creates a ShaderEffect object that generates a linear gradient between two points.\n         * @param { common2D.Point } startPt - Start point.\n         * @param { common2D.Point } endPt - End point.\n         * @param { Array<number> } colors - Array of colors to distribute between the two points.\n         * The values in the array are 32-bit (ARGB) unsigned integers.\n         * @param { TileMode } mode - Tile mode of the shader effect.\n         * @param { Array<number> | null } pos - Relative position of each color in the color array.\n         * The array length must be the same as that of colors. The first element in the array must be 0.0,\n         * the last element must be 1.0, and the middle elements must be between 0.0 and 1.0 and increase by index.\n         * The default value is null, indicating that colors are evenly distributed between the two points.\n         * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect.\n         * The default value is null, indicating the identity matrix.\n         * @returns { ShaderEffect } Returns a linear gradient ShaderEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createLinearGradient(startPt: common2D.Point, endPt: common2D.Point, colors: Array<number>, mode: TileMode, pos?: Array<number> | null, matrix?: Matrix | null): ShaderEffect;\n        /**\n         * Creates a ShaderEffect object that generates a radial gradient based on the center and radius of a circle.\n         * The radial gradient transitions colors from the center to the ending shape in a radial manner.\n         * @param { common2D.Point } centerPt - Center of the circle.\n         * @param { number } radius - Radius of the gradient. A negative number is invalid. The value is a floating point number.\n         * @param { Array<number> } colors - Array of colors to distribute between the center and ending shape of the circle.\n         * The values in the array are 32-bit (ARGB) unsigned integers.\n         * @param { TileMode } mode - Tile mode of the shader effect.\n         * @param { Array<number> | null } pos - Relative position of each color in the color array.\n         * The array length must be the same as that of colors. The first element in the array must be 0.0, the last element must be 1.0,\n         * and the middle elements must be between 0.0 and 1.0 and increase by index.\n         * The default value is null, indicating that colors are evenly distributed between the center and ending shape of the circle.\n         * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect.\n         * The default value is null, indicating the identity matrix.\n         * @returns { ShaderEffect } Returns a radial gradient ShaderEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createRadialGradient(centerPt: common2D.Point, radius: number, colors: Array<number>, mode: TileMode, pos?: Array<number> | null, matrix?: Matrix | null): ShaderEffect;\n        /**\n         * Creates a ShaderEffect object that generates a sweep gradient based on the center.\n         * A sweep gradient paints a gradient of colors in a clockwise or counterclockwise direction based on a given circle center.\n         * @param { common2D.Point } centerPt - Center of the circle.\n         * @param { Array<number> } colors - Array of colors to distribute between the start angle and end angle.\n         * The values in the array are 32-bit (ARGB) unsigned integers.\n         * @param { TileMode } mode - Tile mode of the shader effect.\n         * @param { number } startAngle - Start angle of the sweep gradient, in degrees.\n         * The value 0 indicates the positive direction of the X axis. A positive number indicates an offset towards the positive direction,\n         * and a negative number indicates an offset towards the negative direction. The value is a floating point number.\n         * @param { number } endAngle - End angle of the sweep gradient, in degrees.\n         * The value 0 indicates the positive direction of the X axis. A positive number indicates an offset towards the positive direction,\n         * and a negative number indicates an offset towards the negative direction. A value less than the start angle is invalid.\n         * The value is a floating point number.\n         * @param { Array<number> | null } pos - Relative position of each color in the color array. The array length must be the same as that of colors.\n         * The first element in the array must be 0.0, the last element must be 1.0, and the middle elements must be between 0.0 and 1.0 and increase by index.\n         * The default value is null, indicating that the colors are evenly distributed between the start angle and end angle.\n         * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect.\n         * The default value is null, indicating the identity matrix.\n         * @returns { ShaderEffect } Returns a sweep gradient ShaderEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createSweepGradient(centerPt: common2D.Point, colors: Array<number>, mode: TileMode, startAngle: number, endAngle: number, pos?: Array<number> | null, matrix?: Matrix | null): ShaderEffect;\n        /**\n         * Creates a ShaderEffect object that generates a conical gradient between two given circles.\n         * @param { common2D.Point } startPt - Center of the start circle of the gradient.\n         * @param { number } startRadius - Radius of the start circle of the gradient. A negative number is invalid.\n         * The value is a floating point number.\n         * @param { common2D.Point } endPt - Center of the end circle of the gradient.\n         * @param { number } endRadius - Radius of the end circle of the gradient. A negative value is invalid.\n         * The value is a floating point number.\n         * @param { Array<number> } colors - Array of colors to distribute between the start circle and end circle.\n         * The values in the array are 32-bit (ARGB) unsigned integers.\n         * @param { TileMode } mode - Tile mode of the shader effect.\n         * @param { Array<number> | null } pos - Relative position of each color in the color array. The array length must be the same as that of colors.\n         * The first element in the array must be 0.0, the last element must be 1.0, and the middle elements must be between 0.0 and 1.0 and increase by index.\n         * The default value is null, indicating that colors are evenly distributed between the two circles.\n         * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect.\n         * The default value is null, indicating the identity matrix.\n         * @returns { ShaderEffect } Returns a conical gradient ShaderEffect object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createConicalGradient(startPt: common2D.Point, startRadius: number, endPt: common2D.Point, endRadius: number, colors: Array<number>, mode: TileMode, pos?: Array<number> | null, matrix?: Matrix | null): ShaderEffect;\n        /**\n         * Creates an ShaderEffect object that generates a shader with single image.\n         * @param { image.PixelMap } pixelmap - PixelMap.\n         * @param { TileMode } tileX - Indicates the type of tile mode for horizontal shader effect.\n         * @param { TileMode } tileY - Indicates the type of tile mode for vertical shader effect.\n         * @param { SamplingOptions } samplingOptions - SamplingOptions used to describe the sampling mode.\n         * @param { Matrix | null } matrix - Indicates the Matrix object. The default value is null.\n         * @returns { ShaderEffect } Returns the shader with single image ShaderEffect object.\n         * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createImageShader(pixelmap: image.PixelMap, tileX: TileMode, tileY: TileMode, samplingOptions: SamplingOptions, matrix?: Matrix | null): ShaderEffect;\n        /**\n         * Creates an ShaderEffect object that generates a blend ShaderEffect object by two shaders.\n         * @param { ShaderEffect } dstShaderEffect - Indicates a destination ShaderEffect pointer.\n         * @param { ShaderEffect } srcShaderEffect - Indicates a source ShaderEffect pointer.\n         * @param { BlendMode } blendMode - BlendMode.\n         * @returns { ShaderEffect } Returns a blend ShaderEffect object.\n         * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createComposeShader(dstShaderEffect: ShaderEffect, srcShaderEffect: ShaderEffect, blendMode: BlendMode): ShaderEffect;\n    }\n    /**\n     * Enumerates the tile modes of the shader effect.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TileMode {\n        /**\n         * Replicates the edge color if the shader effect draws outside of its original boundary.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        CLAMP = 0,\n        /**\n         * Repeats the shader effect in both horizontal and vertical directions.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        REPEAT = 1,\n        /**\n         * Repeats the shader effect in both horizontal and vertical directions, alternating mirror images.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        MIRROR = 2,\n        /**\n         * Renders the shader effect only within the original boundary.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DECAL = 3\n    }\n    /**\n     * Implements a shadow layer.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class ShadowLayer {\n        /**\n         * Creates a ShadowLayer object.\n         *\n         * @param { number } blurRadius - Radius of the shadow layer. The value must be a floating point number greater than 0.\n         * @param { number } x - Offset on the X axis. The value is a floating point number.\n         * @param { number } y - Offset on the Y axis. The value is a floating point number.\n         * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255.\n         * @returns { ShadowLayer } ShadowLayer object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static create(blurRadius: number, x: number, y: number, color: common2D.Color): ShadowLayer;\n        /**\n         * Creates a ShadowLayer object.\n         *\n         * @param { number } blurRadius - Radius of the shadow layer. The value must be a floating point number greater than 0.\n         * @param { number } x - Offset on the X axis. The value is a floating point number.\n         * @param { number } y - Offset on the Y axis. The value is a floating point number.\n         * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format.\n         * @returns { ShadowLayer } ShadowLayer object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static create(blurRadius: number, x: number, y: number, color: common2D.Color | number): ShadowLayer;\n    }\n    /**\n     * Defines a color filter.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class ColorFilter {\n        /**\n         * Creates a ColorFilter object with a given color and blend mode.\n         * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255.\n         * @param { BlendMode } mode - Blend mode.\n         * @returns { ColorFilter } Colorfilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static createBlendModeColorFilter(color: common2D.Color, mode: BlendMode): ColorFilter;\n        /**\n         * Creates a ColorFilter object with a given color and blend mode.\n         * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format.\n         * @param { BlendMode } mode - Blend mode.\n         * @returns { ColorFilter } Colorfilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        static createBlendModeColorFilter(color: common2D.Color | number, mode: BlendMode): ColorFilter;\n        /**\n         * Creates a ColorFilter object by combining another two color filters.\n         * @param { ColorFilter } outer - Color filter that takes effect later in the new filter.\n         * @param { ColorFilter } inner - Color filter that takes effect first in the new filter.\n         * @returns { ColorFilter } Colorfilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static createComposeColorFilter(outer: ColorFilter, inner: ColorFilter): ColorFilter;\n        /**\n         * Creates a ColorFilter object that applies the sRGB gamma curve to the RGB channels.\n         * @returns { ColorFilter } Colorfilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static createLinearToSRGBGamma(): ColorFilter;\n        /**\n         * Creates a ColorFilter object that applies the RGB channels to the sRGB gamma curve.\n         * @returns { ColorFilter } Colorfilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static createSRGBGammaToLinear(): ColorFilter;\n        /**\n         * Creates a ColorFilter object that multiplies the luma into the alpha channel and sets the RGB channels to zero.\n         * @returns { ColorFilter } Colorfilter.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        static createLumaColorFilter(): ColorFilter;\n        /**\n         * Creates a color filter object with a 4*5 color matrix.\n         * @param { Array<number> } matrix - An array of 20 numbers, indicating the 4*5 matrix.\n         * @returns { ColorFilter } Colorfilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createMatrixColorFilter(matrix: Array<number>): ColorFilter;\n        /**\n         * Makes a color filter with the given mutColor and addColor.\n         * @param { common2D.Color | number } mutColor - The range of color channels must be [0, 255], used to multiply source color.\n         * @param { common2D.Color | number } addColor - The range of color channels must be [0, 255], used to add to source color.\n         * @returns { ColorFilter } Colorfilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createLightingColorFilter(mutColor: common2D.Color | number, addColor: common2D.Color | number): ColorFilter;\n    }\n    /**\n     * Implements an image filter.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class ImageFilter {\n        /**\n         * Creates an image filter with a given blur effect.\n         * @param { number } sigmaX - Standard deviation of the Gaussian blur along the X axis. The value must be a floating point number greater than 0.\n         * @param { number } sigmaY - Standard deviation of the Gaussian blur along the Y axis. The value must be a floating point number greater than 0.\n         * @param { TileMode } tileMode - Tile mode to apply to the edges.\n         * @param { ImageFilter | null } imageFilter - Filter to which the image filter will be applied.\n         * The default value is null, indicating that the image filter is directly applied to the original image.\n         * @returns { ImageFilter } ImageFilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createBlurImageFilter(sigmaX: number, sigmaY: number, tileMode: TileMode, imageFilter?: ImageFilter | null): ImageFilter;\n        /**\n         * Creates an image filter object with a given color filter effect.\n         * @param { ColorFilter } colorFilter - Color filter.\n         * @param { ImageFilter | null } imageFilter - Filter to which the image filter will be applied. The default value is null,\n         * indicating that the image filter is directly applied to the original image.\n         * @returns { ImageFilter } ImageFilter object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static createFromColorFilter(colorFilter: ColorFilter, imageFilter?: ImageFilter | null): ImageFilter;\n        /**\n         * Makes an ImageFilter object that instance with the provided x and y offset.\n         * @param { number } dx - Indicates the offset in the X direction.\n         * @param { number } dy - Indicates the offset in the Y direction.\n         * @param { ImageFilter | null } input - Indicates the input image filter used to generate offset effects, or uses\n         * the source bitmap if this is null.\n         * @returns { ImageFilter } ImageFilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createOffsetImageFilter(dx: number, dy: number, input?: ImageFilter | null): ImageFilter;\n        /**\n         * Makes an ImageFilter object that applies the bitmap to the input.\n         * @param { image.PixelMap } pixelmap - The source input image.\n         * @param { common2D.Rect | null } srcRect - Indicates the input srcRect, or uses the source bitmap if this is null.\n         * @param { common2D.Rect | null } dstRect - Indicates the input dstRect, or uses the source bitmap if this is null.\n         * @returns { ImageFilter } ImageFilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createFromImage(pixelmap: image.PixelMap, srcRect?: common2D.Rect | null, dstRect?: common2D.Rect | null): ImageFilter;\n        /**\n         * Makes an ImageFilter object that applies the blend to the input.\n         * @param { BlendMode } mode - Blendmode.\n         * @param { ImageFilter } background - Indicates the input background filter.\n         * @param { ImageFilter } foreground - Indicates the input foreground filter.\n         * @returns { ImageFilter } ImageFilter object.\n         * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range.\n         * <br>2. Incorrect parameter types.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n        */\n        static createBlendImageFilter(mode: BlendMode, background: ImageFilter, foreground: ImageFilter): ImageFilter;\n        /**\n         * Makes an ImageFilter object that combines the \"inner\" and \"outer\" filters, allowing the output of the \"inner\"\n         * filter to serve as the input source bitmap for the \"outer\" filter.\n         * @param { ImageFilter } cOuter - Indicates the instance to apply its effects to the output of the 'inner'\n         * filter.\n         * @param { ImageFilter } cInner - Indicates the output as input for \"outer\" filters.\n         * @returns { ImageFilter } ImageFilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createComposeImageFilter(cOuter: ImageFilter, cInner: ImageFilter): ImageFilter;\n        /**\n         * Makes an ImageFilter object that renders the contents of the input Shader.\n         *\n         * @param { ShaderEffect } shader - Indicates the shader effect to be applied to the image.\n         * @returns { ImageFilter } ImageFilter object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static createFromShaderEffect(shader: ShaderEffect): ImageFilter;\n    }\n    /**\n     * Enumerates the join styles of a pen. The join style defines the shape of the joints of a polyline segment drawn by the pen.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum JoinStyle {\n        /**\n         * Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate.\n         * In this case, you need to use the miter limit to limit the miter length.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        MITER_JOIN = 0,\n        /**\n         * Round corner.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ROUND_JOIN = 1,\n        /**\n         * Bevel corner.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BEVEL_JOIN = 2\n    }\n    /**\n     * Enumerates the cap styles of a pen. The cap style defines the style of both ends of a line segment drawn by the pen.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum CapStyle {\n        /**\n         * There is no cap style. Both ends of the line segment are cut off square.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FLAT_CAP = 0,\n        /**\n         * Square cap style. Both ends have a square, the height of which is half of the width of the line segment, with the same width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SQUARE_CAP = 1,\n        /**\n         * Round cap style. Both ends have a semicircle centered, the diameter of which is the same as the width of the line segment.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ROUND_CAP = 2\n    }\n    /**\n     * Enumerates the blur types of a mask filter.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum BlurType {\n        /**\n         * Both the outer edges and the inner solid parts are blurred.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NORMAL = 0,\n        /**\n         * The inner solid part remains unchanged, while only the outer edges are blurred.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SOLID = 1,\n        /**\n         * Only the outer edges are blurred, with the inner solid part being fully transparent.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        OUTER = 2,\n        /**\n         * Only the inner solid part is blurred, while the outer edges remain sharp.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INNER = 3\n    }\n    /**\n     * Defines a pen, which is used to describe the style and color to outline a shape.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class Pen {\n        /**\n         * A constructor used to create a Pen object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor();\n        /**\n         * Copies a Pen object to create a new one.\n         * @param { Pen } pen - Pen object to copy.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor(pen: Pen);\n        /**\n         * Sets the maximum ratio allowed between the sharp corner length of a polyline and its line width.\n         * When drawing a polyline with the pen, if JoinStyle is set to MITER_JOIN and this maximum ratio is exceeded,\n         * the corner will be displayed as beveled instead of mitered.\n         * @param { number } miter - Maximum ratio of the sharp corner length of the polyline to the line width.\n         * A negative number is processed as 4.0 during drawing. Non-negative numbers take effect normally. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setMiterLimit(miter: number): void;\n        /**\n         * Obtains the maximum ratio allowed between the sharp corner length of a polyline and its line width.\n         * @returns { number } Returns the miter limit.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getMiterLimit(): number;\n        /**\n         * Sets the shader effect for this pen.\n         * @param { ShaderEffect } shaderEffect -  ShaderEffect object. If null is passed in, the shader effect will be cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setShaderEffect(shaderEffect: ShaderEffect): void;\n        /**\n        * Sets a color for this pen.\n        * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setColor(color: common2D.Color): void;\n        /**\n        * Sets a color for this pen. This API provides better performance than setColor and is recommended.\n         * @param { number } alpha - Alpha channel value of the color in ARGB format. The value is an integer ranging from 0 to 255\n         *  Any passed-in floating point number is rounded down.\n         * @param { number } red - Red channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n         * @param { number } green - Green channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n         * @param { number } blue - Blue channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 12\n        */\n        setColor(alpha: number, red: number, green: number, blue: number): void;\n        /**\n        * Sets a color for this pen.\n        * @param { number } color - Color in hexadecimal ARGB format.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 18\n        */\n        setColor(color: number): void;\n        /**\n         * Obtains the color of this pen.\n         * @returns { common2D.Color } Returns a 32-bit (ARGB) variable that describes the color.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getColor(): common2D.Color;\n        /**\n         * Obtains the color of this pen.\n         * @returns { number } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getHexColor(): number;\n        /**\n        * Sets the stroke width for this pen. The value 0 is treated as an unusually thin width. During drawing,\n        * the width of 0 is always drawn as 1 pixel wide, regardless of any scaling applied to the canvas.\n        * Negative values are also regarded as the value 0 during the drawing process.\n        *\n        * @param { number } width - Stroke width. The value is a floating point number.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setStrokeWidth(width: number): void;\n        /**\n         * Obtains the stroke width of this pen. The width describes the thickness of the outline of a shape.\n         * @returns { number } Returns the thickness.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getWidth(): number;\n        /**\n        * Enables anti-aliasing for this pen. Anti-aliasing makes the edges of the content smoother.\n        *\n        * @param { boolean } aa - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, and false means the opposite.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setAntiAlias(aa: boolean): void;\n        /**\n         * Checks whether anti-aliasing is enabled for this pen.\n         * @returns { boolean } Returns true if the anti-aliasing is enabled; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isAntiAlias(): boolean;\n        /**\n        * Sets an alpha value for this pen.\n        *\n        * @param { number } alpha - Alpha value. The value is an integer in the range [0, 255]. If a floating point number is passed in, the value is rounded down.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setAlpha(alpha: number): void;\n        /**\n         * Obtains the alpha value of this pen.\n         * @returns { number } Returns a 8-bit variable that describes the alpha.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getAlpha(): number;\n        /**\n        * Sets a color filter for this pen.\n        *\n        * @param { ColorFilter } filter - Color filter. If null is passed in, the color filter is cleared.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setColorFilter(filter: ColorFilter): void;\n        /**\n         * Obtains the color filter of this pen.\n         * @returns { ColorFilter } ColorFilter.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getColorFilter(): ColorFilter;\n        /**\n         * Sets an image filter for this pen.\n         * @param { ImageFilter | null } filter - Image filter. If null is passed in, the image filter effect of the pen will be cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setImageFilter(filter: ImageFilter | null): void;\n        /**\n         * Adds a mask filter for this pen.\n         *\n         * @param { MaskFilter } filter - Mask filter. If null is passed in, the mask filter is cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setMaskFilter(filter: MaskFilter): void;\n        /**\n         * Sets the path effect for this pen.\n         *\n         * @param { PathEffect } effect - Path effect. If null is passed in, the path filter is cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setPathEffect(effect: PathEffect): void;\n        /**\n         * Sets a shadow layer for this pen. The shadow layer effect takes effect only when text is drawn.\n         *\n         * @param { ShadowLayer } shadowLayer - Shadow layer. If null is passed in, the shadow layer is cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setShadowLayer(shadowLayer: ShadowLayer): void;\n        /**\n        * Sets a blend mode for this pen.\n        *\n        * @param { BlendMode } mode - Blend mode.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setBlendMode(mode: BlendMode): void;\n        /**\n        * Enables dithering for this pen. Dithering make the drawn color more realistic.\n        *\n        * @param { boolean } dither - Whether to enable dithering. The value true means to enable dithering, and false means the opposite.\n        * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n        * <br>2. Incorrect parameter types.\n        * @syscap SystemCapability.Graphics.Drawing\n        * @since 11\n        */\n        setDither(dither: boolean): void;\n        /**\n         * Sets the join style for this pen.\n         *\n         * @param { JoinStyle } style - Join style.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setJoinStyle(style: JoinStyle): void;\n        /**\n         * Obtains the join style of this pen.\n         *\n         * @returns { JoinStyle } The JoinStyle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getJoinStyle(): JoinStyle;\n        /**\n         * Sets the cap style for this pen.\n         *\n         * @param { CapStyle } style - Cap style.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setCapStyle(style: CapStyle): void;\n        /**\n         * Obtains the cap style of this pen.\n         *\n         * @returns { CapStyle } The CapStyle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getCapStyle(): CapStyle;\n        /**\n         * Resets this pen to the initial state.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        reset(): void;\n        /**\n         * Obtains the source path outline drawn using this pen and represents it using a destination path.\n         *\n         * @param { Path } src - Source path.\n         * @param { Path } dst - Destination path.\n         * @returns { boolean } true if the path should be filled, or false if it should be drawn with a hairline (width == 0)\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getFillPath(src: Path, dst: Path): boolean;\n    }\n    /**\n     * Defines a brush, which is used to describe the style and color to fill in a shape.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 11\n     */\n    class Brush {\n        /**\n         * A constructor used to create a Brush object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor();\n        /**\n         * Copies a Brush object to create a new one.\n         * @param { Brush } brush - Indicates the Brush object.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor(brush: Brush);\n        /**\n         * Sets a color for this brush.\n         * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setColor(color: common2D.Color): void;\n        /**\n         * Sets a color for this brush. This API provides better performance than setColor and is recommended.\n         * @param { number } alpha - Alpha channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n         * @param { number } red - Red channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n         * @param { number } green - Green channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n         * @param { number } blue - Blue channel value of the color in ARGB format. The value is an integer ranging from 0 to 255.\n         * Any passed-in floating point number is rounded down.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setColor(alpha: number, red: number, green: number, blue: number): void;\n        /**\n         * Sets a color for this brush.\n         * @param { number } color - Color in hexadecimal ARGB format.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        setColor(color: number): void;\n        /**\n         * Obtains the color of this brush.\n         * @returns { common2D.Color } Returns a 32-bit (ARGB) variable that describes the color.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getColor(): common2D.Color;\n        /**\n         * Obtains the color of this brush.\n         * @returns { number } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getHexColor(): number;\n        /**\n         * Enables anti-aliasing for this brush. Anti-aliasing makes the edges of the content smoother.\n         * @param { boolean } aa - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, and false means the opposite.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setAntiAlias(aa: boolean): void;\n        /**\n         * Checks whether anti-aliasing is enabled for this brush.\n         * @returns { boolean } Returns true if anti-aliasing is enabled; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isAntiAlias(): boolean;\n        /**\n         * Sets an alpha value for this brush.\n         * @param { number } alpha - Alpha value. The value is an integer in the range [0, 255]. If a floating point number is passed in, the value is rounded down.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setAlpha(alpha: number): void;\n        /**\n         * Obtains the alpha value of this brush.\n         * @returns { number } Returns a 8-bit variable that describes the alpha.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getAlpha(): number;\n        /**\n         * Sets a color filter for this brush.\n         * @param { ColorFilter } filter - Color filter. If null is passed in, the color filter is cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setColorFilter(filter: ColorFilter): void;\n        /**\n         * Obtains the color filter of this brush.\n         * @returns { ColorFilter } ColorFilter.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getColorFilter(): ColorFilter;\n        /**\n         * Sets an image filter for this brush.\n         * @param { ImageFilter | null } filter - Image filter. If null is passed in, the image filter effect of the brush will be cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setImageFilter(filter: ImageFilter | null): void;\n        /**\n         * Adds a mask filter for this brush.\n         * @param { MaskFilter } filter - Mask filter. If null is passed in, the mask filter is cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setMaskFilter(filter: MaskFilter): void;\n        /**\n         * Sets a shadow layer for this brush. The shadow layer effect takes effect only when text is drawn.\n         *\n         * @param { ShadowLayer } shadowLayer - Shadow layer. If null is passed in, the shadow layer is cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setShadowLayer(shadowLayer: ShadowLayer): void;\n        /**\n         * Sets the shader effect for this brush.\n         * @param { ShaderEffect } shaderEffect - ShaderEffect object. If null is passed in, the shader effect will be cleared.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setShaderEffect(shaderEffect: ShaderEffect): void;\n        /**\n         * Sets a blend mode for this brush.\n         * @param { BlendMode } mode - Blend mode.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 11\n         */\n        setBlendMode(mode: BlendMode): void;\n        /**\n         * Resets this brush to the initial state.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        reset(): void;\n    }\n    /**\n     * Implements a matrix.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class Matrix {\n        /**\n         * Creates a Matrix object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor();\n        /**\n         * Creates a deep copy of the specified matrix object.\n         * @param { Matrix } matrix - The matrix object to copy.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        constructor(matrix: Matrix);\n        /**\n         * Query whether the current matrix is affine or not.\n         * @returns { boolean } Returns true if the matrix is affine; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        isAffine(): boolean;\n        /**\n         * Query whether a rectangle will map to another rectangle after applying this matrix.\n         * @returns { boolean } Returns true if the transformation keeps rectangles as rectangles; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        rectStaysRect(): boolean;\n        /**\n         * Sets this matrix as an identity matrix and rotates it by a given degree around the rotation point (px, py).\n         * @param { number } degree - Angle to rotate, in degrees. A positive number indicates a clockwise rotation,\n         * and a negative number indicates a counterclockwise rotation. The value is a floating point number.\n         * @param { number } px - X coordinate of the rotation point. The value is a floating point number.\n         * @param { number } py - Y coordinate of the rotation point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setRotation(degree: number, px: number, py: number): void;\n        /**\n         * Sets this matrix as an identity matrix and scales it with the coefficients (sx, sy) at the scale point (px, py).\n         * @param { number } sx - Scale coefficient along the X axis. If a negative number is passed in,\n         * the matrix is mirrored around y = px before being scaled. The value is a floating point number.\n         * @param { number } sy - Scale coefficient along the Y axis. If a negative number is passed in,\n         * the matrix is mirrored around x = py before being scaled. The value is a floating point number.\n         * @param { number } px - X coordinate of the scale point. The value is a floating point number.\n         * @param { number } py - Y coordinate of the scale point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setScale(sx: number, sy: number, px: number, py: number): void;\n        /**\n         * Sets this matrix as an identity matrix and translates it by a given distance (dx, dy).\n         * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis,\n         * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number.\n         * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis,\n         * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setTranslation(dx: number, dy: number): void;\n        /**\n         * Sets the skew transformation with a pivot point.\n         * @param { number } kx - The skew factor along the x-axis.\n         * @param { number } ky - The skew factor along the y-axis.\n         * @param { number } px - The x-coordinate of the point around which to apply the skew.\n         * @param { number } py - The y-coordinate of the point around which to apply the skew.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setSkew(kx: number, ky: number, px: number, py: number): void;\n        /**\n         * Sets the sine and cosine values for a rotation transformation around a point.\n         * @param { number } sinValue - The sine of the angle of rotation.\n         * @param { number } cosValue - The cosine of the angle of rotation.\n         * @param { number } px - The x-coordinate of the point around which to rotate.\n         * @param { number } py - The y-coordinate of the point around which to rotate.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setSinCos(sinValue: number, cosValue: number, px: number, py: number): void;\n        /**\n         * Sets parameters for this matrix.\n         * @param { Array<number> } values - Each value in the array represents the following parameters:\n         * values[0] - horizontal scale factor to store.\n         * values[1] - horizontal skew factor to store.\n         * values[2] - horizontal translation to store.\n         * values[3] - vertical skew factor to store.\n         * values[4] - vertical scale factor to store.\n         * values[5] - vertical translation to store.\n         * values[6] - input x-axis values perspective factor to store.\n         * values[7] - input y-axis values perspective factor to store.\n         * values[8] - perspective scale factor to store.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setMatrix(values: Array<number>): void;\n        /**\n         * Sets matrix to the copy of anther matrix object.\n         * @param { Array<number> | Matrix } matrix - Indicates the Matrix object to copy.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setMatrix(matrix: Array<number> | Matrix): void;\n        /**\n         * Sets matrix to the product of matrix A and matrix B.\n         * @param { Matrix } matrixA - Indicates the MatrixA object.\n         * @param { Matrix } matrixB - Indicates the MatrixB object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setConcat(matrixA: Matrix, matrixB: Matrix): void;\n        /**\n         * Sets matrix to the product of 'this' and another.\n         * @param { Matrix } matrix - Indicates the other Matrix object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        postConcat(matrix: Matrix): void;\n        /**\n         * Preconcats the existing matrix with the passed-in matrix.\n         * @param { Matrix } matrix - Matrix object, which is on the right of a multiplication expression.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        preConcat(matrix: Matrix): void;\n        /**\n         * Checks whether this matrix is equal to another matrix.\n         * @param { Matrix } matrix - Matrix to compare.\n         * @returns { Boolean } Returns true if the two matrices are equal; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isEqual(matrix: Matrix): Boolean;\n        /**\n         * Inverts this matrix and returns the result.\n         * @param { Matrix } matrix - Matrix object used to store the inverted matrix.\n         * @returns { Boolean } Returns true if matrix can be inverted; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        invert(matrix: Matrix): Boolean;\n        /**\n         * Checks whether this matrix is an identity matrix.\n         * @returns { Boolean } Returns true if matrix is identity; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isIdentity(): Boolean;\n        /**\n         * Obtains the value of a given index in this matrix. The index ranges from 0 to 8.\n         * @param { number } index - Index. The value is an integer ranging from 0 to 8.\n         * @returns { number } Returns value corresponding to index.Returns 0 if out of range.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getValue(index: number): number;\n        /**\n         * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a\n         * given degree around the rotation point (px, py).\n         * @param { number } degree - Angle to rotate, in degrees. A positive number indicates a clockwise rotation,\n         * and a negative number indicates a counterclockwise rotation. The value is a floating point number.\n         * @param { number } px - X coordinate of the rotation point. The value is a floating point number.\n         * @param { number } py - Y coordinate of the rotation point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        postRotate(degree: number, px: number, py: number): void;\n        /**\n         * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been\n         * scaled with the coefficient (sx, sy) at the scale point (px, py).\n         * @param { number } sx - Scale coefficient along the X axis. If a negative number is passed in,\n         * the matrix is mirrored around y = px before being scaled. The value is a floating point number.\n         * @param { number } sy - Scale coefficient along the Y axis. If a negative number is passed in,\n         * the matrix is mirrored around x = py before being scaled. The value is a floating point number.\n         * @param { number } px - X coordinate of the scale point. The value is a floating point number.\n         * @param { number } py - Y coordinate of the scale point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        postScale(sx: number, sy: number, px: number, py: number): void;\n        /**\n         * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy).\n         * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis,\n         * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number.\n         * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis,\n         * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        postTranslate(dx: number, dy: number): void;\n        /**\n         * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a\n         * given degree around the rotation point (px, py).\n         * @param { number } degree - Angle to rotate, in degrees. A positive number indicates a clockwise rotation,\n         * and a negative number indicates a counterclockwise rotation. The value is a floating point number.\n         * @param { number } px - X coordinate of the rotation point. The value is a floating point number.\n         * @param { number } py - Y coordinate of the rotation point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        preRotate(degree: number, px: number, py: number): void;\n        /**\n         * Sets matrix to matrix constructed from skewing by (kx, ky) about pivot point (px, py), multiplied by matrix.\n         * This can be thought of as skewing relative to a pivot point after applying matrix.\n         * @param { number } kx - Indicates the horizontal skew factor.\n         * @param { number } ky - Indicates the vertical skew factor.\n         * @param { number } px - Indicates the pivot on x-axis.\n         * @param { number } py - Indicates the pivot on y-axis.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        postSkew(kx: number, ky: number, px: number, py: number): void;\n        /**\n         * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been scaled with the\n         * coefficient (sx, sy) at the scale point (px, py).\n         * @param { number } sx - Scale coefficient along the X axis. If a negative number is passed in,\n         * the matrix is mirrored around y = px before being scaled. The value is a floating point number.\n         * @param { number } sy - Scale coefficient along the Y axis. If a negative number is passed in,\n         * the matrix is mirrored around x = py before being scaled. The value is a floating point number.\n         * @param { number } px - X coordinate of the scale point. The value is a floating point number.\n         * @param { number } py - Y coordinate of the scale point. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        preScale(sx: number, sy: number, px: number, py: number): void;\n        /**\n         * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy).\n         * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis,\n         * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number.\n         * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis,\n         * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        preTranslate(dx: number, dy: number): void;\n        /**\n         * Sets matrix to matrix multiplied by matrix constructed from skewing by (kx, ky) about pivot point (px, py).\n         * This can be thought of as scaling relative to a pivot point before applying matrix.\n         * @param { number } kx - Indicates the horizontal skew factor.\n         * @param { number } ky - Indicates the vertical skew factor.\n         * @param { number } px - Indicates the pivot on x-axis.\n         * @param { number } py - Indicates the pivot on y-axis.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        preSkew(kx: number, ky: number, px: number, py: number): void;\n        /**\n         * Resets this matrix to an identity matrix.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        reset(): void;\n        /**\n         * Maps a source point array to a destination point array by means of matrix transformation.\n         * @param { Array<common2D.Point> } src - Array of source points.\n         * @returns { Array<common2D.Point> } Return mapped points array.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        mapPoints(src: Array<common2D.Point>): Array<common2D.Point>;\n        /**\n         * Forms a circle by radius and maps it to a ellipse, returns the average radius of the ellipse.\n         * The average radius is equal to the square root of the product of the major axis length and the minor axis length.\n         * @param { number } radius - circle size to map.\n         * @returns { number } Return average mapped radius.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        mapRadius(radius: number): number;\n        /**\n         * Obtains all element values of this matrix.\n         * @returns { Array<number> } nine scalar values contained by Matrix.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getAll(): Array<number>;\n        /**\n         * Sets the destination rectangle to the bounding rectangle of the shape obtained after transforming the source rectangle\n         * with a matrix transformation. As shown in the figure below, the blue rectangle represents the source rectangle,\n         * and the yellow rectangle is the shape obtained after a matrix transformation is applied to the source rectangle.\n         * Since the edges of the yellow rectangle are not aligned with the coordinate axes, it cannot be represented by a rectangle object.\n         * To address this issue, a destination rectangle (black rectangle) is defined as the bounding rectangle.\n         * @param { common2D.Rect } dst - Rectangle object, which is used to store the bounding rectangle.\n         * @param { common2D.Rect } src - Source rectangle.\n         * @returns { boolean } Returns true if the mapped src is equal to the dst; returns false is not equal.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        mapRect(dst: common2D.Rect, src: common2D.Rect): boolean;\n        /**\n         * Sets this matrix to a transformation matrix that maps a source rectangle to a destination rectangle.\n         * @param { common2D.Rect } src - Source rectangle.\n         * @param { common2D.Rect } dst - Destination rectangle.\n         * @param { ScaleToFit } scaleToFit - Mapping mode from the source rectangle to the target rectangle.\n         * @returns { boolean } Returns true if dst is empty, and sets matrix to:\n                   | 0 0 0 |\n                   | 0 0 0 |\n                   | 0 0 1 |.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setRectToRect(src: common2D.Rect, dst: common2D.Rect, scaleToFit: ScaleToFit): boolean;\n        /**\n         * Sets this matrix to a transformation matrix that maps the source point array to the destination point array.\n         * Both the number of source points and that of destination points must be in the range [0, 4].\n         * @param { Array<common2D.Point> } src - Array of source points. The array length must be the same as the value of count.\n         * @param { Array<common2D.Point> } dst - Array of destination points. The array length must be the same as the value of count.\n         * @param { number } count - Number of points in each array. The value is an integer.\n         * @returns { boolean } Returns true if Matrix was constructed successfully\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setPolyToPoly(src: Array<common2D.Point>, dst: Array<common2D.Point>, count: number): boolean;\n    }\n    /**\n     * Enumerates the modes of scaling a source rectangle into a destination rectangle.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum ScaleToFit {\n        /**\n         * Scales the source rectangle to completely fill the destination rectangle, potentially changing the aspect ratio of the source rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FILL_SCALE_TO_FIT = 0,\n        /**\n         * Scales the source rectangle, preserving its aspect ratio, to align it to the upper left corner of the destination rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        START_SCALE_TO_FIT = 1,\n        /**\n         * Scales the source rectangle, preserving its aspect ratio, to align it to the center of the destination rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        CENTER_SCALE_TO_FIT = 2,\n        /**\n         * Scales the source rectangle, preserving its aspect ratio, to align it to the lower right corner of the destination rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        END_SCALE_TO_FIT = 3\n    }\n    /**\n     * Describes a region, which is used to describe the region where the shape can be drawn.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class Region {\n        /**\n         * Creates an empty region.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        constructor();\n        /**\n         * Creates a deep copy of the specified region object.\n         * @param { Region } region - The region object to copy.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        constructor(region: Region);\n        /**\n         * Creates a region with a rectangle.\n         * @param { number } left - Indicates the left edge of the rectangle.\n         * @param { number } top - Indicates the top edge of the rectangle.\n         * @param { number } right - Indicates the right edge of the rectangle.\n         * @param { number } bottom - Indicates the bottom edge of the rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        constructor(left: number, top: number, right: number, bottom: number);\n        /**\n         * Query whether this region is equal to the other region.\n         * @param { Region } other - Indicates the region object for comparasion.\n         * @returns { boolean } Returns compare result.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        isEqual(other: Region): boolean;\n        /**\n         * Query whether the region contains multiple rectangles.\n         * @returns { boolean } Returns true if the region contains more than one rectangle;\n         * <br>returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        isComplex(): boolean;\n        /**\n         * Query whether the region is empty .\n         * @returns { boolean } Returns true if the region is empty; returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        isEmpty(): boolean;\n        /**\n         * Gets the bounds of the region.\n         * @returns { common2D.Rect } Returns Rect object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        getBounds(): common2D.Rect;\n        /** Gets the boundary of the region, which represents by a path.\n         * Gets the bounds of the region.\n         * @returns { Path } Returns Path object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        getBoundaryPath(): Path;\n        /**\n         * Checks whether a point is contained in this region.\n         * @param { number } x - X coordinate of the point. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } y - Y coordinate of the point. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @returns { boolean } Returns true if (x, y) is inside region; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isPointContained(x: number, y: number): boolean;\n        /**\n         * Checks whether another region is contained in this region.\n         * @param { Region } other - Region object.\n         * @returns { boolean } Returns true if other region is completely inside the region object;\n         * <br>returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        isRegionContained(other: Region): boolean;\n        /**\n         * Performs an operation on this region and another region, and stores the resulting region in this Region object.\n         * @param { Region } region - Region object.\n         * @param { RegionOp } regionOp - Operation mode of the region.\n         * @returns { boolean } Returns true if replaced region is not empty; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        op(region: Region, regionOp: RegionOp): boolean;\n        /**\n         * Offsets the region by adding dx along the x-axis and dy along the y-axis.\n         * @param { number } dx - Indicates the x coordinate of the point. The parameter must be an integer.\n         * @param { number } dy - Indicates the y coordinate of the point. The parameter must be an integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        offset(dx: number, dy: number): void;\n        /**\n         * Checks whether a rectangle do not intersect with this region. Actually,\n         * this API determines whether the rectangle does not intersect with the bounding rectangle of the region, and therefore the result may not be accurate.\n         * @param { number } left - Left position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } top - Top position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } right - Right position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } bottom - Bottom position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @returns { boolean } Returns true if rect and region is not intersect; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        quickReject(left: number, top: number, right: number, bottom: number): boolean;\n        /**\n         * Determines whether region is intersect with another.\n         * @param { Region } region - Indicates the other region for comparasion.\n         * @returns { boolean } Returns true if the region dose not intersect the other, or the region is empty;\n         * <br>returns false otherwise.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        quickRejectRegion(region: Region): boolean;\n        /**\n         * Sets a region that matches the outline of a path within the cropping area.\n         * @param { Path } path - Path object.\n         * @param { Region } clip - Region object.\n         * @returns { boolean } Returns true if constructed region is not empty; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setPath(path: Path, clip: Region): boolean;\n        /**\n         * Sets a rectangle.\n         * @param { number } left - Left position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } top - Top position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } right - Right position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @param { number } bottom - Bottom position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off.\n         * @returns { boolean } Returns true if constructed region is not empty; returns false otherwise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        setRect(left: number, top: number, right: number, bottom: number): boolean;\n        /**\n         * Sets the region to the specified region.\n         * @param { Region } region - Region object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setRegion(region: Region): void;\n        /**\n         * Sets the region to empty.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        setEmpty(): void;\n    }\n    /**\n     * Enumerates the operations for combining two regions.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum RegionOp {\n        /**\n         * Difference operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DIFFERENCE = 0,\n        /**\n         * Intersect operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INTERSECT = 1,\n        /**\n         * Union operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        UNION = 2,\n        /**\n         * XOR operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        XOR = 3,\n        /**\n         * Reverse difference operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        REVERSE_DIFFERENCE = 4,\n        /**\n         * Replace operation.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        REPLACE = 5\n    }\n    /**\n     * Enumerates the corner positions of a rounded rectangle.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum CornerPos {\n        /**\n         * Top left corner of the rounded rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TOP_LEFT_POS = 0,\n        /**\n         * Top right corner of the rounded rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TOP_RIGHT_POS = 1,\n        /**\n         * Bottom right corner of the rounded rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BOTTOM_RIGHT_POS = 2,\n        /**\n         * Bottom left corner of the rounded rectangle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BOTTOM_LEFT_POS = 3\n    }\n    /**\n     * Enumerates the constraint types of the source rectangle.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum SrcRectConstraint {\n        /**\n         * The sampling range is strictly confined to the source rectangle, resulting in a slow sampling speed.\n         *\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        STRICT = 0,\n        /**\n         * The sampling range is not limited to the source rectangle and can extend beyond it, allowing for a high sampling speed.\n         *\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        FAST = 1\n    }\n    /**\n     * A utility class that provides only static methods to convert data structs defined in other modules and common2D.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 15\n     */\n    class Tool {\n        /**\n         * Converts a color value of the ResourceColor type to a common2D.Color object.\n         * @param { ResourceColor } resourceColor - Color value of the ResourceColor type. (All four types of inputs are supported.\n         * The following provides 13 example inputs.) The fourth type of Resource supports only the construction method $r('belonging.type.name').\n         * Ensure that the resource has been defined in the main/resources/base/element directory. (The types color, string,\n         * and integer are available for the belonging app, whereas only the type color is available for the belonging sys.)\n         * @returns { common2D.Color } Returns a 32-bit (ARGB) variable that describes the color.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 15\n         */\n        static makeColorFromResourceColor(resourceColor: ResourceColor): common2D.Color;\n    }\n    /**\n     * This class offers a comprehensive set of operations to handle for common2D Rect object.\n     *\n     * @syscap SystemCapability.Graphics.Drawing\n     * @crossplatform\n     * @since 20\n     */\n    class RectUtils {\n        /**\n         * Makes an uninitialized 2D rectangular object with zero dimensions and origin at (0, 0).\n         *\n         * @returns { common2D.Rect } - Returns an empty Rect object with all coordinates (left, top, right, bottom) set to 0.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static makeEmpty(): common2D.Rect;\n        /**\n         * Makes a 2D rectangular object from boundary coordinates.\n         * @param { number } left - Indicates the X-coordinate of the left edge.\n         * @param { number } top - Indicates the Y-coordinate of the top edge.\n         * @param { number } right - Indicates the X-coordinate of the right edge.\n         * @param { number } bottom - Indicates the Y-coordinate of the bottom edge.\n         * @returns { common2D.Rect } - Returns an Rect object with the specific coordinates (left, top, right, bottom).\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static makeLtrb(left: number, top: number, right: number, bottom: number): common2D.Rect;\n        /**\n         * Makes a deep copy of a 2D rectangular object.\n         * @param { common2D.Rect } src - Indicates the source rectangle to copy.\n         * @returns { common2D.Rect } - Returns an Rect object has the same boundary coordinates with the source.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static makeCopy(src: common2D.Rect): common2D.Rect;\n        /**\n         * Gets the width of a 2D rectangular object.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object to query.\n         * @returns { number } - Returns the width.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static getWidth(rect: common2D.Rect): number;\n        /**\n         * Gets the height of a 2D rectangular object.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object to query.\n         * @returns { number } - Returns the height.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static getHeight(rect: common2D.Rect): number;\n        /**\n         * Calculates the x-coordinate of the center point of the 2D rectangular object.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object to query.\n         * @returns { number } - Returns the center X coordinate.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static centerX(rect: common2D.Rect): number;\n        /**\n         * Calculates the y-coordinate of the center point of the 2D rectangular object.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object to query.\n         * @returns { number } - Returns the center Y coordinate.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static centerY(rect: common2D.Rect): number;\n        /**\n         * Checks if one 2D rectangular object fully contains another.\n         *\n         * @param { common2D.Rect } rect - The container Rect object.\n         * @param { common2D.Rect } other - The Rect object to check for containment.\n         * @returns { boolean } - Returns true if 'rect' fully contains 'other'; returns false otherwise.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static contains(rect: common2D.Rect, other: common2D.Rect): boolean;\n        /**\n         * Checks if one 2D rectangular object fully contains the specified boundary coordinates.\n         *\n         * @param { common2D.Rect } rect - The container Rect object.\n         * @param { number } left - Indicates the left boundary of the target region.\n         * @param { number } top - Indicates the top boundary of the target region.\n         * @param { number } right - Indicates the right boundary of the target region.\n         * @param { number } bottom - Indicates the bottom boundary of the target region.\n         * @returns { boolean } - Returns true if 'rect' fully contains the specified boundary coordinates; returns false otherwise.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static contains(rect: common2D.Rect, left: number, top: number, right: number, bottom: number): boolean;\n        /**\n         * Checks if one 2D rectangular object contains a specific point.\n         *\n         * @param { common2D.Rect } rect - The container Rect object.\n         * @param { number } x - Indicates the X-coordinate of the point to check.\n         * @param { number } y - Indicates the Y-coordinate of the point to check.\n         * @returns { boolean } - Returns true if 'rect' contains the specified point; returns false otherwise.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static contains(rect: common2D.Rect, x: number, y: number): boolean;\n        /**\n         * Modifies a 2D rectangular's boundaries by inward offsets.\n         *\n         * @param { common2D.Rect } rect - The Rect object to adjust.\n         * @param { number } left - Indicates the amount to add from the left boundary.\n         * @param { number } top - Indicates the amount to add from the top boundary.\n         * @param { number } right - Indicates the amount to substract from the right boundary.\n         * @param { number } bottom - Indicates the amount to substract from the bottom boundary.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static inset(rect: common2D.Rect, left: number, top: number, right: number, bottom: number): void;\n        /**\n         * Relpace a 2D rectangular object by the intersection of itself and another.\n         * If the intersection is empty, nothing is done.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @param { common2D.Rect } other - Indicates the other Rect object.\n         * @returns { boolean } - Returns true if have area in common and 'rect' will be replaced by the intersection;\n         * returns false if the intersection is empty and 'rect' will not be modified.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static intersect(rect: common2D.Rect, other: common2D.Rect): boolean;\n        /**\n         * Checks if two 2D rectangular objects intersect.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @param { common2D.Rect } other - Indicates the other Rect object.\n         * @returns { boolean } - Returns true if have area in common, otherwise return false.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static isIntersect(rect: common2D.Rect, other: common2D.Rect): boolean;\n        /**\n         * Sets a 2D rectangular object to the union of itself and another.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @param { common2D.Rect } other - Indicates the other Rect object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static union(rect: common2D.Rect, other: common2D.Rect): void;\n        /**\n         * Checks if the 2D rectangular object is empty.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @returns { boolean } - Returns true if the rectangle is empty (left >= right or top >= bottom); returns false otherwise.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static isEmpty(rect: common2D.Rect): boolean;\n        /**\n         * Offsets the 2D rectangular object by adding dx to its left and right coordinates,\n         * and adding dy to its top and bottom coordinates.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @param { number } dx - Indicates the amount to add to the rectangle's left and right coordinates.\n         * @param { number } dy - Indicates the amount to add to the rectangle's top and bottom coordinates.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static offset(rect: common2D.Rect, dx: number, dy: number): void;\n        /**\n         * Offsets the rectangle to a specific position and kepps the width and height unchanged.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @param { number } newLeft - Indicates the new left coordinates.\n         * @param { number } newTop - Indicates the new top coordinates.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static offsetTo(rect: common2D.Rect, newLeft: number, newTop: number): void;\n        /**\n         * Sets the boundary coordinates of a 2D rectangular object with that of another.\n         * @param { common2D.Rect } rect - Indicates the Rect object to be modified.\n         * @param { common2D.Rect } other - Indicates the source rectangle to copy.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static setRect(rect: common2D.Rect, other: common2D.Rect): void;\n        /**\n         * Sets the boundary coordinates of a 2D rectangular object with that of specific value.\n         * @param { common2D.Rect } rect - Indicates the Rect object to be modified.\n         * @param { number } left - Indicates the X-coordinate of the left edge.\n         * @param { number } top - Indicates the Y-coordinate of the top edge.\n         * @param { number } right - Indicates the X-coordinate of the right edge.\n         * @param { number } bottom - Indicates the Y-coordinate of the bottom edge.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static setLtrb(rect: common2D.Rect, left: number, top: number, right: number, bottom: number): void;\n        /**\n         * Sets the boundary coordinates of a 2D rectangular object to zero.\n         * @param { common2D.Rect } rect - Indicates the Rect object to be modified.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static setEmpty(rect: common2D.Rect): void;\n        /**\n         * Normalizes the 2D rectangular object to ensuer validity.\n         * Swaps the left and right if the left is greater than right;\n         * and swaps top and bottom if the top is greater than bottom.\n         * If the edges are already valid, then nothing is done.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static sort(rect: common2D.Rect): void;\n        /**\n         * Checks if the 2D rectangular object has the same coordinates value with another.\n         *\n         * @param { common2D.Rect } rect - Indicates the Rect object.\n         * @param { common2D.Rect } other - Indicates the other Rect object for comparison.\n         * @returns { boolean } Returns true if left, top, right and bottom of rect and other are equal; returns false otherwise.\n         * @static\n         * @syscap SystemCapability.Graphics.Drawing\n         * @crossplatform\n         * @since 20\n         */\n        static isEqual(rect: common2D.Rect, other: common2D.Rect): boolean;\n    }\n}\nexport default drawing;\n",
}
export default FILE;